mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 20:51:31 +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;
|
size_t linesize = 0;
|
||||||
|
|
||||||
linesize = strcspn(curr, "\n\r");
|
linesize = strcspn(curr, "\n\r");
|
||||||
if (strncmp(curr, "//", 2) &&
|
if (*curr && strncmp(curr, "//", 2) &&
|
||||||
*curr != '\n' && *curr != '\r')
|
*curr != '\n' && *curr != '\r')
|
||||||
{
|
{
|
||||||
nlocalmessages ++;
|
nlocalmessages ++;
|
||||||
|
@ -117,7 +117,10 @@ LocalizationInit(void)
|
||||||
|
|
||||||
linesize = strcspn(curr, "\n");
|
linesize = strcspn(curr, "\n");
|
||||||
/* skip lines with both endline codes */
|
/* skip lines with both endline codes */
|
||||||
nlocalmessages ++;
|
if (*curr && *curr != ';')
|
||||||
|
{
|
||||||
|
nlocalmessages ++;
|
||||||
|
}
|
||||||
curr += linesize;
|
curr += linesize;
|
||||||
if (curr >= (buf_level + len_level))
|
if (curr >= (buf_level + len_level))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue