mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Merge branch 'long-sprite-names' into 'next'
Fix SOC freeslotting including trailing spaces in constant names See merge request STJr/SRB2!2415
This commit is contained in:
commit
b6544efceb
1 changed files with 7 additions and 5 deletions
|
@ -405,7 +405,6 @@ void readfreeslots(MYFILE *f)
|
||||||
{
|
{
|
||||||
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
|
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
|
||||||
char *word,*type;
|
char *word,*type;
|
||||||
char *tmp;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
do
|
do
|
||||||
|
@ -415,10 +414,13 @@ void readfreeslots(MYFILE *f)
|
||||||
if (s[0] == '\n')
|
if (s[0] == '\n')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
tmp = strchr(s, '#');
|
char *hashtag = strchr(s, '#');
|
||||||
if (tmp)
|
char *space = strchr(s, ' ');
|
||||||
*tmp = '\0';
|
if (hashtag)
|
||||||
if (s == tmp)
|
*hashtag = '\0';
|
||||||
|
if (space)
|
||||||
|
*space = '\0';
|
||||||
|
if (s == hashtag || s == space)
|
||||||
continue; // Skip comment lines, but don't break.
|
continue; // Skip comment lines, but don't break.
|
||||||
|
|
||||||
type = strtok(s, "_");
|
type = strtok(s, "_");
|
||||||
|
|
Loading…
Reference in a new issue