]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
ccode: Fix line breaking of string literals with octal escape sequences
authorJürg Billeter <j@bitron.ch>
Mon, 30 May 2011 19:11:49 +0000 (21:11 +0200)
committerJürg Billeter <j@bitron.ch>
Tue, 31 May 2011 19:06:23 +0000 (21:06 +0200)
ccode/valaccodeconstant.vala

index 85e63c73e4c1ef8942a2754913164d7fc6275661..a3377237ae0c71d2d42473eb32de1d711c94db62 100644 (file)
@@ -74,6 +74,20 @@ public class Vala.CCodeConstant : CCodeExpression {
                                                p++;
                                        }
                                        break;
+                               case '0':
+                               case '1':
+                               case '2':
+                               case '3':
+                               case '4':
+                               case '5':
+                               case '6':
+                               case '7':
+                                       // octal character
+                                       while (p < end && p - begin_of_char <= 3 && *p >= '0' && *p <= '7') {
+                                               builder.append_c (*p);
+                                               p++;
+                                       }
+                                       break;
                                case 'n':
                                        // break line at \n
                                        col = LINE_LENGTH;