Browse Source

Fix unsiged underflow

Jisi Liu 8 năm trước cách đây
mục cha
commit
cc58be617d
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/google/protobuf/stubs/io_win32_unittest.cc

+ 1 - 1
src/google/protobuf/stubs/io_win32_unittest.cc

@@ -85,7 +85,7 @@ class IoWin32Test : public ::testing::Test {
 
 namespace {
 void StripTrailingSlashes(string* str) {
-  size_t i = str->size() - 1;
+  int i = str->size() - 1;
   for (; i >= 0 && ((*str)[i] == '/' || (*str)[i] == '\\'); --i) {}
   str->resize(i+1);
 }