From: Jürg Billeter Date: Sun, 27 Jun 2010 20:20:52 +0000 (+0200) Subject: dova: Fix string size when using escaped characters X-Git-Tag: 0.9.3~88 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=96445cb7ea340dafe06ebec850adeeb5d98381b2;p=thirdparty%2Fvala.git dova: Fix string size when using escaped characters --- diff --git a/codegen/valadovabasemodule.vala b/codegen/valadovabasemodule.vala index 2d4542820..a5888f0ff 100644 --- a/codegen/valadovabasemodule.vala +++ b/codegen/valadovabasemodule.vala @@ -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");