summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2011-02-16 09:40:19 +0100
committerFridrich Štrba <fridrich.strba@bluewin.ch>2011-02-16 09:40:19 +0100
commit1511a227317d463943dfde08a7183abd8e569f71 (patch)
treed00c9d1f808f8b3e6da6c17898559ac74eed2d42 /l10ntools
parentdc8bab8cb1fd3dacbce125a9ad229adddb9c631a (diff)
Fix a crash when using on cygwin with symlinked directories
But only God knows where is actually the root cause of this crash
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/cfgmerge.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index cbbe329e669b..c441ccdb1a8e 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -253,7 +253,7 @@ extern FILE *GetCfgFile()
// create file name, beginnig with project root
// (e.g.: source\ui\src\menue.src)
-// printf("sFullEntry = %s\n",sFullEntry.GetBuffer());
+// printf("sFullEntry = %s\n",sFullEntry.GetBuffer());
sActFileName = sFullEntry.Copy( sPrjEntry.Len() + 1 );
// printf("sActFileName = %s\n",sActFileName.GetBuffer());
@@ -337,7 +337,10 @@ CfgStackData *CfgStack::GetStackData( size_t nPos )
/*****************************************************************************/
{
if ( nPos == LIST_APPEND )
- nPos = maList.size() - 1;
+ if (maList.size())
+ nPos = maList.size() - 1;
+ else
+ return 0;
return maList[ nPos ];
}
@@ -578,7 +581,7 @@ int CfgParser::Execute( int nToken, char * pToken )
void CfgParser::Error( const ByteString &rError )
/*****************************************************************************/
{
-// ByteString sError( rError );
+// ByteString sError( rError );
// sError.Append("Error: In file ");
// sError.Append( sActFileName );
yyerror(( char * ) rError.GetBuffer());
@@ -659,7 +662,7 @@ void CfgExport::WorkOnRessourceEnd()
ByteString sFallback = pStackData->sText[ ByteString("en-US") ];
//if ( pStackData->sText[ ByteString("en-US") ].Len())
- // sFallback = pStackData->sText[ ByteString("en-US") ];
+ // sFallback = pStackData->sText[ ByteString("en-US") ];
ByteString sLocalId = pStackData->sIdentifier;
ByteString sGroupId;
@@ -777,7 +780,7 @@ void CfgMerge::WorkOnText(
}
//if ( nLangIndex.EqualsIgnoreCaseAscii("de") )
- // bGerman = TRUE;
+ // bGerman = TRUE;
if (( nLangIndex.EqualsIgnoreCaseAscii("en-US") ))
bEnglish = TRUE;