diff --git a/ChangeLog b/ChangeLog index d83f8db1f..24a149401 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-11-02 Larry Campbell + + * Tools/make_strings/make_strings.m: Fix line missed in last patch. + * Source/NSPropertyList.m: Fixes for date serialization byte swaps. + 2010-10-31 Larry Campbell * Tools/make_strings/make_strings.m: Permits tool to take nil as the diff --git a/Source/NSPropertyList.m b/Source/NSPropertyList.m index f560ed69f..8232d9c86 100644 --- a/Source/NSPropertyList.m +++ b/Source/NSPropertyList.m @@ -2947,7 +2947,7 @@ GSPropertyListMake(id obj, NSDictionary *loc, BOOL xml, } else if (next == 0x33) { - double in; + NSSwappedDouble in; // Date NSDate *date; [data getBytes: &in range: NSMakeRange(counter, sizeof(double))]; @@ -3764,7 +3764,7 @@ isEqualFunc(const void *item1, const void *item2, - (void) storeDate: (NSDate*) date { unsigned char code; - double out; + NSSwappedDouble out; code = 0x33; [dest appendBytes: &code length: 1]; diff --git a/Tools/make_strings/make_strings.m b/Tools/make_strings/make_strings.m index 0505e39c7..34ed9e12e 100644 --- a/Tools/make_strings/make_strings.m +++ b/Tools/make_strings/make_strings.m @@ -369,12 +369,18 @@ printf(" %3i : %i '%s'\n", i, arg_ok[i], args[i]); comment = [NSString stringWithCString: (char*)args[lf->comment_index]]; - if (lf->table_index == -1) - table = @"Localizable"; /* TODO: customizable? */ + if (lf->table_index == -1 + || (arg_ok[lf->table_index] + && (args[lf->table_index] == 0 + || strcmp("nil", (char*)args[lf->table_index]) == 0))) + { + table = @"Localizable"; /* TODO: customizable? */ + } else - table = [NSString stringWithCString: - (char*)args[lf->table_index]]; - + { + table = [NSString stringWithCString: + (char*)args[lf->table_index]]; + } e = [[SourceEntry alloc] initWithKey: key comment: comment file: filenamestr