]> granicus.if.org Git - nethack/commitdiff
msdos follow-up bit
authornhmall <nhmall@nethack.org>
Mon, 27 Jan 2020 22:54:13 +0000 (17:54 -0500)
committernhmall <nhmall@nethack.org>
Mon, 27 Jan 2020 22:54:13 +0000 (17:54 -0500)
src/options.c

index 1af0e9d2bc38dcb3cd2d9514df6d902052dfb72e..504977dd709e6b29449d032d0671e5b140b62bfa 100644 (file)
@@ -3377,9 +3377,11 @@ boolean tinitial, tfrom_file;
             bad_negation(fullname, FALSE);
             return FALSE;
         }
-        op = string_for_opt(opts, negated);
-        iflags.wc_video_width = strtol(op, NULL, 10);
-        return FALSE;
+        if ((op = string_for_opt(opts, negated)) != empty_optstr)
+            iflags.wc_video_width = strtol(op, NULL, 10);
+        else
+            return FALSE;
+        return retval;
     }
     fullname = "video_height";
     if (match_optname(opts, fullname, 7, TRUE)) {
@@ -3389,9 +3391,11 @@ boolean tinitial, tfrom_file;
             bad_negation(fullname, FALSE);
             return FALSE;
         }
-        op = string_for_opt(opts, negated);
-        iflags.wc_video_height = strtol(op, NULL, 10);
-        return FALSE;
+        if ((op = string_for_opt(opts, negated)) != empty_optstr)
+            iflags.wc_video_height = strtol(op, NULL, 10);
+       else
+            return FALSE;
+        return retval;
     }
 #ifdef NO_TERMS
     /* video:string -- must be after longer tests */