This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

bug in strrchr() - always return 0 when you search '\0' char

strrchr() - return 0 when you search '\0' char

:sample test code

Expected output : hell~     (Tested and works on standard libraries on windows and Linux)

Actual output:hello.  (On KEIL, Not ok)


IDE-Version:
µVision V5.28.0.0
Copyright (C) 2019 ARM Ltd and ARM Germany GmbH. All rights reserved.

Tool Version Numbers:
Toolchain: MDK Professional 5.28 (Flex) Version: 5.28.0.0
Toolchain Path: C:\Keil_MDK528a\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.06 update 6 (build 750)
Assembler: Armasm.exe V5.06 update 6 (build 750)
Linker/Locator: ArmLink.exe V5.06 update 6 (build 750)
Library Manager: ArmAr.exe V5.06 update 6 (build 750)
Hex Converter: FromElf.exe V5.06 update 6 (build 750)
CPU DLL: SARMCM3.DLL V5.28.0.0
Dialog DLL: TCM.DLL V1.36.2.0
Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.0.6.0
Dialog DLL: TCM.DLL V1.36.2.0

 

0