diff options
author | agrajaghh <agrajaghh@gmail.com> | 2016-09-30 11:04:11 +0300 |
---|---|---|
committer | agrajaghh <agrajaghh@gmail.com> | 2016-09-30 11:04:11 +0300 |
commit | 2e88e82cae4b2e7e58fa5944565e0d82b6b9f8c7 (patch) | |
tree | bffcda630e45175266f7ad79b2b0e0faf35cf49e /BuildTools | |
parent | 93bbdf6db2fca47c412ab3dee4382db355adc4c7 (diff) |
count the lines from the beginning not from the end
Diffstat (limited to 'BuildTools')
-rw-r--r-- | BuildTools/LocalizationTool2/Program.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/BuildTools/LocalizationTool2/Program.cs b/BuildTools/LocalizationTool2/Program.cs index 7030b7317..9fd7d69bd 100644 --- a/BuildTools/LocalizationTool2/Program.cs +++ b/BuildTools/LocalizationTool2/Program.cs @@ -49,7 +49,7 @@ namespace LocalizationTool2 var txt = File.ReadAllText(f);
foreach (Match match in re.Matches(txt))
{
- var linepos = txt.Substring(match.Index).Count(x => x == '\n');
+ var linepos = txt.Substring(0, match.Index).Count(x => x == '\n') + 1;
var str = match.Groups["sourcestring"].Value.Replace("\n", "\\n").Replace("\r", "\\r");
LocalizationEntry le;
if (!map.TryGetValue(str, out le))
|