]> Shamusworld >> Repos - rmac/blobdiff - direct.c
Fixed bug when expanding macros with comments that have @, \, etc.
[rmac] / direct.c
index 7010e4616980714d6fdd3242a63a047581c56330..dc44e8e62371b5b5eb72229801c8800bd347fdf6 100644 (file)
--- a/direct.c
+++ b/direct.c
@@ -1590,28 +1590,30 @@ int d_gpumain(void)
        return error("What the hell? Do you think we adhere to the Goof standard?");
 }
 
+
 //
 // .opt - turn a specific (or all) optimisation on or off
 //
 int d_opt(void)
 {
-       char * tmpstr;
-
        while (*tok != EOL)
        {
                if (*tok == STRING)
                {
                        tok++;
-                       tmpstr = string[*tok++];
+                       char * tmpstr = string[*tok++];
 
                        if (ParseOptimization(tmpstr) != OK)
                        {
                                char temperr[256];
-                               sprintf(temperr, "unknown optimisation flag '%s'.", tmpstr);
+                               sprintf(temperr, "unknown optimisation flag '%s'", tmpstr);
                                return error(temperr);
                        }
                }
                else
-                       return error(".opt directive needs every switch enclosed inside quotation marks.");
+                       return error(".opt directive needs every switch enclosed inside quotation marks");
        }
-}
\ No newline at end of file
+
+       return OK;
+}
+