Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » [Fixed!] ScanUuid returns wrong value
[Fixed!] ScanUuid returns wrong value [message #28700] Sun, 12 September 2010 22:32 Go to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

This is due to bug in scanX function, Uuid.cpp @ 34.
Correct scanX is:
dword scanX(const char *s)
{
    dword r = 0;
    for(int i = 0; i < 8; i++) {
        r = (r << 4) | (*s >= '0' && *s <= '9' ?      *s - '0' :
                        *s >= 'A' && *s <= 'F' ? 10 + *s - 'A' :
                        *s >= 'a' && *s <= 'f' ? 10 + *s - 'a' : 0);
        s++;
    }
    return r;
}

[Updated on: Tue, 28 September 2010 21:50]

Report message to a moderator

Re: [BUG] ScanUuid returns wrong value [message #28821 is a reply to message #28700] Sat, 18 September 2010 08:26 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Good catch, thank you.

Mirek
Previous Topic: Is there linked list in u++?
Next Topic: How to catch a dll exception
Goto Forum:
  


Current Time: Fri Apr 19 22:00:43 CEST 2024

Total time taken to generate the page: 0.83721 seconds