Changeset 303 for trunk/launch


Ignore:
Timestamp:
10/27/06 10:49:09 (18 years ago)
Author:
Nicholas Riley
Message:

main.c: Fix endianness issues in creator code (thanks, Peter Hosey).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/launch/launch/main.c

    r268 r303  
    385385        case 'c':
    386386            if (strlen(optarg) != 4) errexit("creator (argument of -c) must be four characters long");
    387             OPTS.creator = *(OSTypePtr)optarg;
     387            OPTS.creator = htonl(*(OSTypePtr)optarg);
    388388            appSpecified = true;
    389389            break;
     
    636636
    637637const char *utf8StringFromOSType(OSType osType) {
     638    osType = ntohl(osType);
    638639    CFStringRef typeStr = CFStringCreateWithBytes(NULL, (UInt8 *)&osType, 4, CFStringGetSystemEncoding(), false);
    639640    if (typeStr == NULL) {
Note: See TracChangeset for help on using the changeset viewer.