Well here is the error,
Debug Error !
Program : MVT.EXE
Module :
File : i386\chkesp.c
Line : 42
The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
I have isolated the line of code that when commented out I do not get this error but all it is an assignement of a global variable (global menu_id = 3; ) I know, I know, I wouldnt be using global but I didnt write the code I am only converting the code to GLUT/OpenGL.
The error statement says it has to do with function pointers though… I am not using functions pointers at all except the glut callback function definitions… The error does occurs in the Keyboard event callback when I hit the enter key. Here is the switch portion for the enter key.
case cp_RETKEY:
potato(0);
if(0)
{
strcpy(Mfile,"?");
}
else
{
display();
menu_id = 2;
menu();
menu_id = 3; //if i comment this out the error disappears. Notice that the same var is used above still.
}
menu();
break;
Well just wondering if anyone else has ever had a similar problem.
[This message has been edited by delic (edited 10-14-2002).]
[This message has been edited by delic (edited 10-14-2002).]
[This message has been edited by delic (edited 10-14-2002).]