VirtualBox

Changeset 30255 in vbox


Ignore:
Timestamp:
Jun 16, 2010 2:55:17 PM (14 years ago)
Author:
vboxsync
Message:

iprt/memcmp.asm: fixed wrongly returning 0 on 64-bit hosts if the bytes that differ are followed by the bytes that are the same.

Location:
trunk/src/VBox/Runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/memcmp.asm

    r28800 r30255  
    105105    sub     rsi, 8
    106106    sub     rdi, 8
     107    repe cmpsb
    107108.not_equal_byte:
    108     repe cmpsb
    109109    mov     al, [xDI-1]
    110110    movzx   ecx, byte [xSI-1]
  • trunk/src/VBox/Runtime/testcase/tstNoCrt-1.cpp

    r28800 r30255  
    458458    iDiff = RT_NOCRT(memcmp)(s_szTest1, s_szTest3, sizeof(s_szTest1)); CHECK_DIFF( < );
    459459    iDiff = RT_NOCRT(memcmp)(s_szTest3, s_szTest1, sizeof(s_szTest1)); CHECK_DIFF( > );
     460    iDiff = RT_NOCRT(memcmp)("1234", "1a34", 4); CHECK_DIFF( < );
    460461
    461462    RTPrintf("tstNoCrt-1: strcmp\n");
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette