James,
I've snipped the 'clear-strings' portion form the CLEAR function and added it to the '.asm' listing:
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; call clear_allvars
;
mov esi, _var_start
mov edi, _int_start ; clear strings
mov ecx, 0
add esi, 4
@@:
.if esi < edi
mov eax, [esi]
.if eax != 0
pushad
invoke free, eax
popad
mov [esi], ecx
.endif
add esi, 4
jmp @B
.endif
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I've zipped the EXE and the .asm file.
So, rather than calling the 'clear' function, it's inserted into the code.
I'm of the feeling that the "free" might be the issue.
CLEAR first clears strings, then integers, then floats.
Only clearing strings calls "free".
I've tested it here, but, of course it works fine.
If you could run the EXE and see if it crashes, that might point in the right direction.
Thanks,
Steve