Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2354)

Unified Diff: base/string_number_conversions.cc

Issue 7584031: base::HexStringToInt conversion function treats the string "0x" as a valid hex number (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | base/string_number_conversions_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_number_conversions.cc
===================================================================
--- base/string_number_conversions.cc (revision 95764)
+++ base/string_number_conversions.cc (working copy)
@@ -220,7 +220,7 @@
// Note: no performance difference was found when using template
// specialization to remove this check in bases other than 16
- if (traits::kBase == 16 && end - begin >= 2 && *begin == '0' &&
+ if (traits::kBase == 16 && end - begin > 2 && *begin == '0' &&
(*(begin + 1) == 'x' || *(begin + 1) == 'X')) {
begin += 2;
}
« no previous file with comments | « AUTHORS ('k') | base/string_number_conversions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698