Commit cc58be61 authored by Jisi Liu's avatar Jisi Liu

Fix unsiged underflow

parent 7dbee324
...@@ -85,7 +85,7 @@ class IoWin32Test : public ::testing::Test { ...@@ -85,7 +85,7 @@ class IoWin32Test : public ::testing::Test {
namespace { namespace {
void StripTrailingSlashes(string* str) { void StripTrailingSlashes(string* str) {
size_t i = str->size() - 1; int i = str->size() - 1;
for (; i >= 0 && ((*str)[i] == '/' || (*str)[i] == '\\'); --i) {} for (; i >= 0 && ((*str)[i] == '/' || (*str)[i] == '\\'); --i) {}
str->resize(i+1); str->resize(i+1);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment