Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » TheIde crashes when there is an error in translation file
TheIde crashes when there is an error in translation file [message #39816] |
Fri, 03 May 2013 16:55  |
Zbych
Messages: 327 Registered: July 2009
|
Senior Member |
|
|
Hi,
TheIde crashes when there is an error in translation file in the main package (e.g. it contains empty source string T_(""))
SyncT function adds index to mainsT even if nothing is added to tfile.
for(int iFile = 0; iFile < pk.file.GetCount(); iFile++) {
String file = SourcePath(n, pk.file[iFile]);
String ext = GetFileExt(file);
if(ext == ".t" || ext == ".jt") {
VectorMap<String, LngEntry> tmap(pmap, 0);
if(LngParseTFile(file, tmap)) {
TFile& tf = tfile.Add();
tf.java = (ext == ".jt");
tf.package = n;
tf.file = pk.file[iFile];
tf.map = tmap;
tf.MakeLS();
}
// mark that we've found a local translation file
localT = true;
// store index of main package translation(s) file(s)
//ERROR
if(iPackage == 0)
mainsT.Add(tfile.GetCount() - 1);
}
}
I guess that it should look like this:
for(int iFile = 0; iFile < pk.file.GetCount(); iFile++) {
String file = SourcePath(n, pk.file[iFile]);
String ext = GetFileExt(file);
if(ext == ".t" || ext == ".jt") {
VectorMap<String, LngEntry> tmap(pmap, 0);
if(LngParseTFile(file, tmap)) {
TFile& tf = tfile.Add();
tf.java = (ext == ".jt");
tf.package = n;
tf.file = pk.file[iFile];
tf.map = tmap;
tf.MakeLS();
// mark that we've found a local translation file
localT = true;
// store index of main package translation(s) file(s)
if(iPackage == 0)
mainsT.Add(tfile.GetCount() - 1);
}
}
}
|
|
|
|
Goto Forum:
Current Time: Tue May 13 04:37:02 CEST 2025
Total time taken to generate the page: 0.02882 seconds
|