8 Jun
2008
8 Jun
'08
5:33 p.m.
Hi This code produce a crash on linux with chuck-alsa. Maybe the "logic" is not right but the crash exist. class Foo {} fun void appendCap( Foo arr[], int n ) { Foo @ aux[ arr.cap() + n ]; for( int i; i < arr.cap(); i++ ) { arr[i] @=> aux[i]; } aux @=> arr; } Foo @ vars[5]; for( int i; i < vars.cap(); i++ ) <<< vars[i] >>>; appendCap( vars, 5 ); //<<< vars[4] >>>; <<< vars.cap() >>>; <<< "End" >>>; /* this work fine fun Foo[] append( Foo arr[], int n ) { Foo @ aux[ arr.cap() + n ]; for( int i; i < arr.cap(); i++ ) { arr[i] @=> aux[i]; } return aux; } */ Yours Lucas
6041
Age (days ago)
6041
Last active (days ago)
0 comments
1 participants
participants (1)
-
lucas samaruga