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

Unified Diff: src/lexer/even-more-experimental-scanner.cc

Issue 78303002: Even more experimental scanner: fix buffer_end_ when we have wider chars. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lexer/even-more-experimental-scanner.cc
diff --git a/src/lexer/even-more-experimental-scanner.cc b/src/lexer/even-more-experimental-scanner.cc
index eee1521d4003789c5e9dcaac904d93f214bc31c9..e9974e29060981ffdc04bf1b69e5dd49103b8f26 100644
--- a/src/lexer/even-more-experimental-scanner.cc
+++ b/src/lexer/even-more-experimental-scanner.cc
@@ -96,7 +96,7 @@ EvenMoreExperimentalScanner::EvenMoreExperimentalScanner(
int size = 0;
buffer_ = const_cast<YYCTYPE*>(reinterpret_cast<const YYCTYPE*>(
ReadFile(fname, isolate, &size, repeat)));
- buffer_end_ = buffer_ + size;
+ buffer_end_ = buffer_ + size / sizeof(YYCTYPE);
start_ = buffer_;
cursor_ = buffer_;
marker_ = buffer_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698