-Minor fix in VM_registercvar.
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 29 Oct 2004 11:39:35 +0000 (11:39 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 29 Oct 2004 11:39:35 +0000 (11:39 +0000)
-Added \" support to quoted strings in Com_ParseToken.
-Minor change to PRVM_PrintStatus.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4722 d7cf8633-e32d-0410-b094-e92efae38249

common.c
menu.c
prvm_cmds.c
prvm_exec.c

index 23658af..6f8065a 100644 (file)
--- a/common.c
+++ b/common.c
@@ -669,6 +669,8 @@ skipwhite:
                // quoted string
                for (data++;*data != '\"';data++)
                {
+                       if (*data == '\\' && data[1] == '"' )
+                               data++;
                        if (!*data || len >= (int)sizeof(com_token) - 1)
                        {
                                com_token[0] = 0;
diff --git a/menu.c b/menu.c
index c2e7dc1..162d4d2 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -4188,7 +4188,7 @@ mfunction_t *PRVM_ED_FindFunction(const char *);
 // normal menu names (rest)
 #define M_F_TOGGLE             "m_toggle"
 #define M_F_SHUTDOWN   "m_shutdown"
-#undef NG_MENU
+
 static char *m_required_func[] = {
 M_F_INIT,
 M_F_KEYDOWN,
index 67f6873..dbfd572 100644 (file)
@@ -1543,7 +1543,7 @@ void VM_registercvar (void)
                return;
        }
 
-       Cvar_Get(name, value, 0);
+       Cvar_Get(name, value, flags);
 
        PRVM_G_FLOAT(OFS_RETURN) = 1; // success
 }
index 09bebf2..fe79817 100644 (file)
@@ -252,7 +252,7 @@ void PRVM_PrintState(void)
        int i;
        if (prog->xfunction)
        {
-               for (i = -4;i <= 0;i++)
+               for (i = -7; i <= 0;i++)
                        if (prog->xstatement + i >= prog->xfunction->first_statement)
                                PRVM_PrintStatement (prog->statements + prog->xstatement + i);
        }