NO

Author Topic: Possible bug in 9.00 using _strrichr  (Read 1796 times)

Offline John Z

  • Member
  • *
  • Posts: 790
Possible bug in 9.00 using _strrichr
« on: November 27, 2019, 05:50:38 PM »
Hello_World.c test code attached to simply demonstrate the possible bug.
 The example of the 'problem' code resides in the MainDlgProc
 in Pelles C (win64) version 8.00.60 it compiles and runs without
 error. Platform is Windows 7. Three message boxes are displayed
 
 Running the exact same code in Pelles C version 9.00.9 it compiles
 without error. It shows the first message box, never gets to the second
 or third message box. The Platform is Windows 10 (64 bit).
 
 Run Pelles C tool, Process Viewer, to see and kill off Hello_world.exe
 
 Change all _strrichr to _strichr and it works fine...


                         p_po= _strichr(p_line+3,':');
          MessageBoxA(hwndDlg,"Found it","_strichr BY POINTER OK",MB_OK);
         
          p_lpo = _strrichr("This is a test : where is the colon?",':');
          MessageBoxA(hwndDlg,"Found it","_strrichr BY STRING OK",MB_OK); 
         
          p_lpo = _strrichr(p_line+3,':');
          MessageBoxA(hwndDlg,"Found it","_strrichr BY POINTER OK",MB_OK);             

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: Possible bug in 9.00 using _strrichr
« Reply #1 on: November 28, 2019, 10:51:56 PM »
I've tried my luck on Win7-64 with PellesC 9.0 and strichr/strrichr. It compiles fine but DialogBox resp. DialogBoxParamA returns -1 and error 0x714, error_resource_data_not_found.

Offline John Z

  • Member
  • *
  • Posts: 790
Re: Possible bug in 9.00 using _strrichr
« Reply #2 on: November 29, 2019, 01:08:40 PM »
Hmmm - perhaps the Pelles zip did not include everything.  In any case, yes it will always compile without issue, however when executing the version 9.00 build the program goes off into the woods when using the _strrichr function..

Thanks for the heads up on the zip files I'll double check what is included. 

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Possible bug in 9.00 using _strrichr
« Reply #3 on: December 01, 2019, 09:19:38 PM »
Well, there is something going here (or not, depending on how you see it). I will have a look....
/Pelle