]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
dova: Fix string size when using escaped characters
authorJürg Billeter <j@bitron.ch>
Sun, 27 Jun 2010 20:20:52 +0000 (22:20 +0200)
committerJürg Billeter <j@bitron.ch>
Sun, 27 Jun 2010 20:20:52 +0000 (22:20 +0200)
codegen/valadovabasemodule.vala

index 2d4542820dee2c68fe7216c15ac51e5cac6a5565..a5888f0ff4e534677a08005df8d886761bf7109f 100644 (file)
@@ -1539,7 +1539,7 @@ internal class Vala.DovaBaseModule : CCodeModule {
                var val = new CCodeInitializerList ();
                val.append (new CCodeConstant ("0"));
                // FIXME handle escaped characters in scanner/parser and escape them here again for C
-               val.append (new CCodeConstant ((expr.value.size () - 2).to_string ()));
+               val.append (new CCodeConstant ((expr.eval ().size ()).to_string ()));
                val.append (new CCodeConstant (expr.value));
 
                var cdecl = new CCodeDeclaration ("const string");