Possible bug in 9.00 using _strrichr

Started by John Z, November 27, 2019, 05:50:38 PM

Previous topic - Next topic

John Z

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);             

jj2007

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.

John Z

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. 

Pelle

Well, there is something going here (or not, depending on how you see it). I will have a look....
/Pelle