montegoulding / mergJSON

JSON encode / decode external for LiveCode
http://mergext.com
GNU General Public License v3.0
12 stars 11 forks source link

Bugfix 20245 #10

Open mwieder opened 7 years ago

mwieder commented 7 years ago

If JSONToArray is passed an empty parameter for the JSON object, the external fails to parse it and returns an error message. That ends up hanging the calling function and it isn't possible to edit the calling script because the engine is in a "script is still executing" state. The only way out is to force-quit LC and lose and unsaved changes. This PR just returns empty if the JSON parameter is empty and so avoids getting into the force-quit situation.

montegoulding commented 7 years ago

@mwieder I think the only commit in this PR should be ff6cb0c. Could you cherry-pick that commit onto a clean master branch.