ObjFW  Check-in [13e226f9c8]

Overview
Comment:OFOptionsParser: Fix a nil vs. NULL mishap
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 13e226f9c85474a148f6234807d3ced18ddd7a0e92ac48b61a0681caa62c8551
User & Date: js on 2015-12-03 20:56:23
Other Links: manifest | tags
Context
2015-12-03
21:44
OFOptionsParser.h: Add missing __unsafe_unretained check-in: 4d4a95aeb6 user: js tags: trunk
20:56
OFOptionsParser: Fix a nil vs. NULL mishap check-in: 13e226f9c8 user: js tags: trunk
2015-12-02
00:06
configure.ac: Fix posix_spawnp test check-in: 90a847c022 user: js tags: trunk
Changes

Modified src/OFOptionsParser.m from [aa2c46db93] to [5e085ceea7].

204
205
206
207
208
209
210
211
212
213
214
215
216
217
218

			_lastLongOption = [[argument substringWithRange:
			    of_range(2, pos - 2)] copy];

			objc_autoreleasePoolPop(pool);

			option = [_longOptions valueForKey: _lastLongOption];
			if (option == nil)
				return '?';

			if (option->hasArgument == 1 && _argument == nil)
				return ':';
			if (option->hasArgument == 0 && _argument != nil)
				return '=';








|







204
205
206
207
208
209
210
211
212
213
214
215
216
217
218

			_lastLongOption = [[argument substringWithRange:
			    of_range(2, pos - 2)] copy];

			objc_autoreleasePoolPop(pool);

			option = [_longOptions valueForKey: _lastLongOption];
			if (option == NULL)
				return '?';

			if (option->hasArgument == 1 && _argument == nil)
				return ':';
			if (option->hasArgument == 0 && _argument != nil)
				return '=';