diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lpgen/lpgen.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/lpgen/lpgen.js b/tools/lpgen/lpgen.js index 7d8102568b..4cea704c3d 100644 --- a/tools/lpgen/lpgen.js +++ b/tools/lpgen/lpgen.js @@ -517,7 +517,7 @@ array.push(";============================================================"); if (filename) array.push("; File: "+filename[1]); else array.push("; File: "+plugin+".dll"); if (pluginname) array.push("; Plugin: "+pluginname[1]); else array.push("; Plugin: "+plugin); if (MAJOR_VERSION) array.push("; Version: "+MAJOR_VERSION[1]+"."+MINOR_VERSION[1]+"."+RELEASE_NUM[1]+"."+BUILD_NUM[1]); else array.push("; Version: x.x.x.x"); -if (author) array.push("; Authors: "+author[1]); else array.push("; Authors: "); +if (author) array.push("; Authors: "+fixHexa(author[1])); else array.push("; Authors: "); //add a header end mark array.push(";============================================================"); if (description) array.push("["+description[1]+"]"); @@ -525,6 +525,13 @@ if (description) array.push("["+description[1]+"]"); versionfile_stream.Close(); } +//Replaces \x?? hexa codes with their char representation +function fixHexa(string) { + return string.replace(/\\x([a-fA-F0-9]{2})" "/g,function() { + return String.fromCharCode(parseInt(arguments[1],16)); + }); +} + //Removes duplicates, not mine, found at http://dreaminginjavascript.wordpress.com/2008/08/22/eliminating-duplicates/ function eliminateDuplicates(arr) { var i, |