src/state.c

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