Skip to content

Instantly share code, notes, and snippets.

@take-cheeze
Created March 21, 2013 08:17
Show Gist options
  • Select an option

  • Save take-cheeze/5211482 to your computer and use it in GitHub Desktop.

Select an option

Save take-cheeze/5211482 to your computer and use it in GitHub Desktop.
diff --git a/src/platform/wine_registry.cpp b/src/platform/wine_registry.cpp
index 3df7e93..a839e53 100644
--- a/src/platform/wine_registry.cpp
+++ b/src/platform/wine_registry.cpp
@@ -84,7 +84,8 @@ struct parse_registry {
line.clear();
std::string tmp;
do {
- if(not line.empty() and *line.rbegin() == '\\') { line.erase(line.rbegin().base()); }
+ if(not line.empty() and *line.rbegin() == '\\')
+ { line.resize(line.size() - 1); }
std::getline(ifs, tmp);
++line_number;
line += tmp;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment