sanshelly / wsdl2objc

Automatically exported from code.google.com/p/wsdl2objc
MIT License
0 stars 0 forks source link

if (!ch) return nil; #115

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Generate classes for a service that sometimes returns missing date attributes
2. Add to iPhone project
3. Run on iPhone
4. Watch the fireworks

What is the expected output?
I expect that the NSDate extension parses empty or nil string as nil, and not 
crash.

What do you see instead?
It crashes.

What version of the product are you using? On what operating system?
0.7pre1

Please provide any additional information below.
Please add    "if (!ch) return nil;"
to line ~204ish
of the NSDate+ISO8601Parsing_M.template
(or pick a better way of doing it, I don't really care >.>)

Original issue reported on code.google.com by josh.dep...@gmail.com on 22 Sep 2010 at 1:32

GoogleCodeExporter commented 8 years ago
In file Templates/NSDate_ISO8601/NSDate+ISO8601Parsing_M.template, rewrite line 
206 like this:

  if(!isValidDate || (strict && isspace(*ch))) {

Original comment by stephane...@gmail.com on 29 Sep 2010 at 11:53

GoogleCodeExporter commented 8 years ago
Agreed with comment #1.
Fixed in revision 187

Original comment by hasse...@gmail.com on 4 Mar 2011 at 6:39

GoogleCodeExporter commented 8 years ago
Issue 128 has been merged into this issue.

Original comment by pmilosev on 4 Oct 2011 at 12:16