mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 02:42:20 +00:00
Allow spaces in captions defined in SOC
This commit is contained in:
parent
d71b99a56b
commit
8f01e85ade
1 changed files with 13 additions and 11 deletions
|
@ -2839,26 +2839,28 @@ void readsound(MYFILE *f, INT32 num)
|
|||
if (s[0] == '\n')
|
||||
break;
|
||||
|
||||
// First remove trailing newline, if there is one
|
||||
tmp = strchr(s, '\n');
|
||||
if (tmp)
|
||||
*tmp = '\0';
|
||||
|
||||
tmp = strchr(s, '#');
|
||||
if (tmp)
|
||||
*tmp = '\0';
|
||||
if (s == tmp)
|
||||
continue; // Skip comment lines, but don't break.
|
||||
|
||||
word = strtok(s, " ");
|
||||
if (word)
|
||||
strupr(word);
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
word2 = strtok(NULL, " ");
|
||||
if (word2)
|
||||
value = atoi(word2);
|
||||
else
|
||||
{
|
||||
deh_warning("No value for token %s", word);
|
||||
continue;
|
||||
}
|
||||
// Now get the part after
|
||||
word2 = tmp += 2;
|
||||
value = atoi(word2); // used for numerical settings
|
||||
|
||||
if (fastcmp(word, "SINGULAR"))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue