vala r1588 - in trunk: . vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1588 - in trunk: . vala
- Date: Sun, 15 Jun 2008 21:17:13 +0000 (UTC)
Author: juergbi
Date: Sun Jun 15 21:17:12 2008
New Revision: 1588
URL: http://svn.gnome.org/viewvc/vala?rev=1588&view=rev
Log:
2008-06-15 JÃrg Billeter <j bitron ch>
* vala/valascanner.vala:
Fix line number calculation for verbatim strings, fixes bug 537123
Modified:
trunk/ChangeLog
trunk/vala/valascanner.vala
Modified: trunk/vala/valascanner.vala
==============================================================================
--- trunk/vala/valascanner.vala (original)
+++ trunk/vala/valascanner.vala Sun Jun 15 21:17:12 2008
@@ -621,13 +621,19 @@
while (current < end - 4) {
if (current[0] == '"' && current[1] == '"' && current[2] == '"') {
break;
- }
- unichar u = ((string) current).get_char_validated ((long) (end - current));
- if (u != (unichar) (-1)) {
- current += u.to_utf8 (null);
- token_length_in_chars++;
+ } else if (current[0] == '\n') {
+ current++;
+ line++;
+ column = 1;
+ token_length_in_chars = 3;
} else {
- Report.error (new SourceReference (source_file, line, column + token_length_in_chars, line, column + token_length_in_chars), "invalid UTF-8 character");
+ unichar u = ((string) current).get_char_validated ((long) (end - current));
+ if (u != (unichar) (-1)) {
+ current += u.to_utf8 (null);
+ token_length_in_chars++;
+ } else {
+ Report.error (new SourceReference (source_file, line, column + token_length_in_chars, line, column + token_length_in_chars), "invalid UTF-8 character");
+ }
}
}
if (current[0] == '"' && current[1] == '"' && current[2] == '"') {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]