VirtualBox

Changeset 57662 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
Sep 9, 2015 12:03:20 PM (9 years ago)
Author:
vboxsync
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/USBIdDatabaseGenerator.cpp

    r57649 r57662  
    120120        default:
    121121        {
     122            // encode multibyte UTF-8 symbols to be sure that they
     123            // will be safely read by compiler
    122124            if ((unsigned char)res[i] >= 127)
    123125            {
     
    130132                    temp.append(buffer);
    131133                } while ((unsigned char)res[++i] & 0x80);
     134                // splitting string after escape sequence to finish number sequence
     135                // otherwise it could lead to situation when "\x88a" will threathened as
     136                // multibyte symbol '\x88a' instead of two symbols '\x88' and 'a'
    132137                temp.append("\" \"");
    133138                res.replace(start, i - start, temp);
     
    137142        }
    138143    }
    139   return res;
     144    return res;
    140145}
    141146
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