]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_shared.c
win32: add two includes to make sure the constants for file mode and sharing are...
[xonotic/darkplaces.git] / model_shared.c
index 653e0c8a723c510c45ec6efc5bfc734ed335153a..296d799ed6508bd382eb239fd1eb79f51533f32c 100644 (file)
@@ -282,6 +282,17 @@ static int Mod_FrameGroupify_ParseGroups(const char *buf, mod_framegroupify_pars
                        loop = true;
                }
 
+               if (strcmp(com_token, "\n") && strcmp(com_token, "//"))
+               {
+                       while (COM_ParseToken_Simple(&bufptr, true, false, false)) // fetch newline
+                       {
+                               if (strcmp(com_token, "\n") && strcmp(com_token, "//"))
+                                       Con_Printf("framegroups file: extra data (%s) found, skipped\n", com_token);
+                               else
+                                       break;
+                       }
+               }
+
                name = NULL;
                if(!strcmp(com_token, "//"))
                {
@@ -291,11 +302,14 @@ static int Mod_FrameGroupify_ParseGroups(const char *buf, mod_framegroupify_pars
                                {
                                        name = com_token;
                                        // skip to EOL
-                                       while (*bufptr && *bufptr != '\n' && *bufptr != '\r')
+                                       while (*bufptr && !(*bufptr == '\n' || *bufptr == '\r'))
+                                               bufptr++;
+                                       while (*bufptr && (*bufptr == '\n' || *bufptr == '\r'))
                                                bufptr++;
                                }
                        }
                }
+               //Con_Printf("data: %d %d %d %f %d (%s)\n", i, start, len, fps, loop, name);
 
                if(cb)
                        cb(i, start, len, fps, loop, name, pass);