ObjFW  Check-in [6a96844ffe]

Overview
Comment:of_asprintf: Don't require set up OFLocalization
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 0.90
Files: files | file ages | folders
SHA3-256: 6a96844ffe4decf4ad0bcbaedbd0619814013c9b9362b5c12bb7669168951a0a
User & Date: js on 2017-08-11 15:47:55
Other Links: branch diff | manifest | tags
Context
2017-08-11
18:20
Fix warning with 32 bit Clang check-in: e874c297ba user: js tags: 0.90
15:47
of_asprintf: Don't require set up OFLocalization check-in: 6a96844ffe user: js tags: 0.90
2017-08-06
20:31
OFZIPArchive: Fix uncompressed + data descriptor check-in: aff4d1cf35 user: js tags: 0.90
Changes

Modified src/of_asprintf.m from [3e2fecec3f] to [e20ce9de33].

556
557
558
559
560
561
562
563

564


565
566


567
568
569
570
571
572
573
556
557
558
559
560
561
562

563
564
565
566


567
568
569
570
571
572
573
574
575







-
+

+
+
-
-
+
+







			void *pool = objc_autoreleasePoolPush();
			char *tmp2;

			@try {
				OFMutableString *tmpStr = [OFMutableString
				    stringWithUTF8String: tmp
						  length: tmpLen];
				OFString *decimalPoint =
				OFString *point =
				    [OFLocalization decimalPoint];
				if (point != nil)
					[tmpStr
				[tmpStr replaceOccurrencesOfString: decimalPoint
							withString: @"."];
					    replaceOccurrencesOfString: point
							    withString: @"."];
				if ([tmpStr UTF8StringLength] > INT_MAX)
					return false;
				tmpLen = (int)[tmpStr UTF8StringLength];
				tmp2 = malloc(tmpLen);
				memcpy(tmp2, [tmpStr UTF8String], tmpLen);
			} @finally {
				free(tmp);