[chuck-users] popBack() bug?
mike clemow
gelfmuse at gmail.com
Mon Mar 2 19:25:12 EST 2009
Hey all,
I'm pretty sure that popBack() is broken:
class Stack {
string stack[0];
fun void push( string s ) {
stack << s;
}
fun string pop() {
stack[stack.size()-1] => string s;
//stack.popBack(); // comment this out and it works...
return s;
}
}
Stack stack;
stack.push( "five" );
stack.push( "six" );
<<< stack.pop() >>>;
<<< stack.stack[0] >>>;
---
This will crash with this error:
chuck_oo.cpp:114: failed assertion `m_ref_count > 0'
Abort trap
Anyone else run into this?
-Mike
--
http://michaelclemow.com
http://semiotech.org
More information about the chuck-users
mailing list