[vala] dova: Fix string size when using escaped characters



commit 96445cb7ea340dafe06ebec850adeeb5d98381b2
Author: Jürg Billeter <j bitron ch>
Date:   Sun Jun 27 22:20:52 2010 +0200

    dova: Fix string size when using escaped characters

 codegen/valadovabasemodule.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valadovabasemodule.vala b/codegen/valadovabasemodule.vala
index 2d45428..a5888f0 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");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]