diff --git a/Quake/gl_model.c b/Quake/gl_model.c index c3181e2d..049f75d6 100644 --- a/Quake/gl_model.c +++ b/Quake/gl_model.c @@ -2021,6 +2021,7 @@ void Mod_SetExtraFlags (model_t *mod) { extern cvar_t r_nolerp_list; const char *s; + char tmp[MAX_QPATH]; int i; if (!mod || !mod->name || mod->type != mod_alias) @@ -2029,17 +2030,27 @@ void Mod_SetExtraFlags (model_t *mod) mod->flags &= 0xFF; //only preserve first byte // nolerp flag - for (s=r_nolerp_list.string; *s; s += i+1, i=0) + s = r_nolerp_list.string; + while (*s) { - //search forwards to the next comma or end of string - for (i=0; s[i] != ',' && s[i] != 0; i++) ; - + // make a copy until the next comma or end of string + i = 0; + while (*s && *s != ',') + { + if (i < MAX_QPATH - 1) + tmp[i++] = *s; + s++; + } + tmp[i] = '\0'; //compare it to the model name - if (!strncmp(mod->name, s, i)) + if (!strcmp(mod->name, tmp)) { mod->flags |= MOD_NOLERP; break; } + //search forwards to the next comma or end of string + while (*s && *s == ',') + s++; } // noshadow flag (TODO: make this a cvar list) diff --git a/README.html b/README.html index 7de4f4e4..47f29002 100644 --- a/README.html +++ b/README.html @@ -11,7 +11,7 @@
 

-

QuakeSpasm 0.85.5 (12 December 2011)

+

QuakeSpasm 0.85.5 (14 December 2011)

1. About

@@ -165,6 +165,7 @@ Compile time options include
  • Added support for loading external entity files, controlled by new cvar external_ents.
  • Made mp3 playback to allocate system memory instead of zone
  • Some updates to the progs interpreter code
  • +
  • Fixed r_nolerp_list parsing code from fitzquake
  • Several code updates from uHexen2, several code cleanups.
  • diff --git a/README.sgml b/README.sgml index 68b6c695..360be056 100644 --- a/README.sgml +++ b/README.sgml @@ -4,7 +4,7 @@ -QuakeSpasm 0.85.5 (12 December 2011) +QuakeSpasm 0.85.5 (14 December 2011) About

    @@ -99,6 +99,7 @@ Alternatively, have a look at Makefile.darwin for more instructions on Added support for loading external entity files, controlled by new cvar external_ents. Made mp3 playback to allocate system memory instead of zone Some updates to the progs interpreter code + Fixed r_nolerp_list parsing code from fitzquake Several code updates from uHexen2, several code cleanups.

    diff --git a/README.txt b/README.txt index 89a238e6..50056f0c 100644 --- a/README.txt +++ b/README.txt @@ -29,7 +29,7 @@ ______________________________________________________________________ - QuakeSpasm 0.85.5 (12 December 2011) + QuakeSpasm 0.85.5 (14 December 2011) 1. About @@ -171,6 +171,8 @@ o Some updates to the progs interpreter code + o Fixed r_nolerp_list parsing code from fitzquake + o Several code updates from uHexen2, several code cleanups. 5.2. Changes in 0.85.4