[Pinfo-devel] r20 - pinfo/trunk/src

Bas Zoetekouw bas at costa.debian.org
Sun Jul 24 23:13:04 UTC 2005


Author: bas
Date: 2005-07-24 23:13:04 +0000 (Sun, 24 Jul 2005)
New Revision: 20

Modified:
   pinfo/trunk/src/filehandling_functions.c
Log:
Small fix to the language code in initpaths(): make sure we only allocate
langshort once.


Modified: pinfo/trunk/src/filehandling_functions.c
===================================================================
--- pinfo/trunk/src/filehandling_functions.c	2005-07-24 23:04:09 UTC (rev 19)
+++ pinfo/trunk/src/filehandling_functions.c	2005-07-24 23:13:04 UTC (rev 20)
@@ -875,7 +875,7 @@
 			lang[i]='\0';
 		}
 		/* if lang is sublocalized (nl_BE or so), also use short version */
-		if (lang[i]=='_')
+		if (lang[i]=='_' && langshort==NULL)
 		{
 			langshort = strdup(lang);
 			langshort[i] = '\0';
@@ -1154,3 +1154,4 @@
 		}
 	}
 }
+




More information about the Pinfo-devel mailing list