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

Unified Diff: src/conversions.cc

Issue 1217007: Fix conform test. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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 | « no previous file | test/mjsunit/str-to-num.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/conversions.cc
===================================================================
--- src/conversions.cc (revision 4244)
+++ src/conversions.cc (working copy)
@@ -295,7 +295,7 @@
|| (*current >= 'a' && *current <= 'f')
|| (*current >= 'A' && *current <= 'F')) {
if (significant_digits <= max_significant_digits) {
- buffer[buffer_pos++] = *current;
+ buffer[buffer_pos++] = static_cast<char>(*current);
significant_digits++;
} else {
insignificant_digits++;
@@ -425,7 +425,7 @@
while (*current >= '0' && *current <= '9') {
if (significant_digits < max_significant_digits) {
ASSERT(buffer_pos < buffer_size);
- buffer[buffer_pos++] = *current;
+ buffer[buffer_pos++] = static_cast<char>(*current);
significant_digits++;
// Will later check if it's an octal in the buffer.
} else {
@@ -439,7 +439,6 @@
if (*current == '.') {
ASSERT(buffer_pos < buffer_size);
- buffer[buffer_pos++] = '.';
++current;
if (current == end) {
if (significant_digits == 0 && !leading_zero) {
@@ -448,6 +447,7 @@
goto parsing_done;
}
}
+ buffer[buffer_pos++] = '.';
if (significant_digits == 0) {
octal = false;
@@ -464,7 +464,7 @@
while (*current >= '0' && *current <= '9') {
if (significant_digits < max_significant_digits) {
ASSERT(buffer_pos < buffer_size);
- buffer[buffer_pos++] = *current;
+ buffer[buffer_pos++] = static_cast<char>(*current);
significant_digits++;
} else {
// Ignore insignificant digits in the fractional part.
@@ -496,7 +496,7 @@
}
char sign = '+';
if (*current == '+' || *current == '-') {
- sign = *current;
+ sign = static_cast<char>(*current);
++current;
if (current == end) {
if (allow_trailing_junk) {
« no previous file with comments | « no previous file | test/mjsunit/str-to-num.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698