diff --git a/src/shell/shell_cmds.cpp b/src/shell/shell_cmds.cpp index a8cf22bd..3cfb13c6 100644 --- a/src/shell/shell_cmds.cpp +++ b/src/shell/shell_cmds.cpp @@ -1235,7 +1235,16 @@ void DOS_Shell::CMD_VER(char *args) { char* word = StripWord(args); if(strcasecmp(word,"set")) return; word = StripWord(args); - dos.version.major = (Bit8u)(atoi(word)); - dos.version.minor = (Bit8u)(atoi(args)); + if (!*args && !*word) { //Reset + dos.version.major = 5; + dos.version.minor = 0; + } else if (*args == 0 && *word && (strchr(word,'.') != 0)) { //Allow: ver set 5.1 + const char * p = strchr(word,'.'); + dos.version.major = (Bit8u)(atoi(word)); + dos.version.minor = (Bit8u)(atoi(p+1)); + } else { //Official syntax: ver set 5 2 + dos.version.major = (Bit8u)(atoi(word)); + dos.version.minor = (Bit8u)(atoi(args)); + } } else WriteOut(MSG_Get("SHELL_CMD_VER_VER"),VERSION,dos.version.major,dos.version.minor); }