mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 06:20:48 +00:00
game localization: skip commented out and emplty lines
This commit is contained in:
parent
3a5d0afea5
commit
ce98c8a957
1 changed files with 5 additions and 2 deletions
|
@ -89,7 +89,7 @@ LocalizationInit(void)
|
|||
size_t linesize = 0;
|
||||
|
||||
linesize = strcspn(curr, "\n\r");
|
||||
if (strncmp(curr, "//", 2) &&
|
||||
if (*curr && strncmp(curr, "//", 2) &&
|
||||
*curr != '\n' && *curr != '\r')
|
||||
{
|
||||
nlocalmessages ++;
|
||||
|
@ -117,7 +117,10 @@ LocalizationInit(void)
|
|||
|
||||
linesize = strcspn(curr, "\n");
|
||||
/* skip lines with both endline codes */
|
||||
nlocalmessages ++;
|
||||
if (*curr && *curr != ';')
|
||||
{
|
||||
nlocalmessages ++;
|
||||
}
|
||||
curr += linesize;
|
||||
if (curr >= (buf_level + len_level))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue