Thanks for the info. Ive tried debugging in, and it just crashes the debugger with 'exit code 0' I think it was. Anyway, ive narrowed it down to this line, which is in a function:
Code:
if((strcmpi(command,"end program"))==0)
If I replace it with

if(1)

Then it runs just fine. Anyone know why?