Results 1 to 3 of 3

Thread: crash on close

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800

    crash on close

    In my windows program I use this code, when using it it crashes on close:

    Code:
    char URL[20];
    	sprintf(URL, "http://newyork.yankees.mlb.com/NASApp/mlb/nyy/homepage/nyy_homepage.jsp"); //test url
    	char FileName[15] = "yankees.txt";
    	URLDownloadToFile(NULL, URL, FileName, 0, NULL);
    	
    	FILE *myfile;
    
    	char big[5000];
    	FILE *in;
    	in = fopen(FileName,"r");
    	while (!feof(in))
    	{
    		if ( fgets(big,sizeof(big),in) != NULL)  
    		{
    			  AppendToEdit(big, Test);
    		}
    	}
    	fclose(in);

  2. #2
    Zaei
    Guest
    The string you are copying to URL is WAY too long. Define URL as charURL[200], insread of 20. You are getting a memory overwrite error, most likely.

    Z.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    damn what a stupid thing to get an error on, originally I had a different url in there that was under 20...well thanks!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width