aboutsummaryrefslogtreecommitdiff
path: root/editors/poedit/files/patch-src_gexecute.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editors/poedit/files/patch-src_gexecute.cpp')
-rw-r--r--editors/poedit/files/patch-src_gexecute.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/editors/poedit/files/patch-src_gexecute.cpp b/editors/poedit/files/patch-src_gexecute.cpp
new file mode 100644
index 000000000000..c281c3a752a3
--- /dev/null
+++ b/editors/poedit/files/patch-src_gexecute.cpp
@@ -0,0 +1,36 @@
+--- src/gexecute.cpp.orig 2015-08-03 10:49:16 UTC
++++ src/gexecute.cpp
+@@ -32,6 +32,8 @@
+ #include <wx/stdpaths.h>
+ #include <wx/filename.h>
+
++#include <sstream>
++
+ #include "gexecute.h"
+ #include "errors.h"
+ #include "chooselang.h"
+@@ -49,6 +51,14 @@
+ using std::regex_match;
+ #endif
+
++static int strtoi(const std::string& s)
++{
++ std::istringstream str(s);
++ int i;
++ str >> i;
++ return i;
++}
++
+ namespace
+ {
+
+@@ -186,7 +196,8 @@ bool ExecuteGettextAndParseOutput(const
+ wsmatch match;
+ if (regex_match(e, match, RE_ERROR))
+ {
+- rec.line = std::stoi(match.str(1));
++ std::string str(match.str(1).begin(),match.str(2).end());
++ rec.line = strtoi(str);
+ rec.text = match.str(3);
+ errors.push_back(rec);
+ wxLogTrace("poedit.execute",