src/state.c

changeset 33
ae97a3146978
parent 18
320dc6206f52
child 52
a350dfa92895
     1.1 diff -r a44afcf2354c -r ae97a3146978 src/state.c
     1.2 --- a/src/state.c	Thu Dec 02 17:01:34 2010 +0000
     1.3 +++ b/src/state.c	Thu Dec 02 17:12:28 2010 +0000
     1.4 @@ -17,7 +17,7 @@
     1.5  	// Basically: 512KiB minimum, 4MiB maximum, in increments of 512KiB.
     1.6  	if ((ramsize < 512*1024) || ((ramsize % (512*1024)) != 0))
     1.7  		return -1;
     1.8 -	state.ram = malloc(state.ram_size);
     1.9 +	state.ram = malloc(ramsize);
    1.10  	if (state.ram == NULL)
    1.11  		return -2;
    1.12  	state.ram_size = ramsize;