[pure-lang-svn] SF.net SVN: pure-lang: [398] pure/trunk/interpreter.cc
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-07-06 08:54:11
|
Revision: 398 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=398&view=rev Author: agraef Date: 2008-07-06 01:54:21 -0700 (Sun, 06 Jul 2008) Log Message: ----------- Bugfix: copy strings in constant definitions. Reported by Eddie Rucker. Modified Paths: -------------- pure/trunk/interpreter.cc Modified: pure/trunk/interpreter.cc =================================================================== --- pure/trunk/interpreter.cc 2008-07-06 07:44:56 UTC (rev 397) +++ pure/trunk/interpreter.cc 2008-07-06 08:54:21 UTC (rev 398) @@ -606,7 +606,7 @@ case EXPR::DBL: return expr(EXPR::DBL, x->data.d); case EXPR::STR: - return expr(EXPR::STR, x->data.s); + return expr(EXPR::STR, strdup(x->data.s)); case EXPR::PTR: if (x->data.p != 0) // Only null pointer constants permitted right now. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |