{"action":"created","issue":{"url":"https://api.github.com/repos/compuphase/pawn/issues/14","repository_url":"https://api.github.com/repos/compuphase/pawn","labels_url":"https://api.github.com/repos/compuphase/pawn/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/compuphase/pawn/issues/14/comments","events_url":"https://api.github.com/repos/compuphase/pawn/issues/14/events","html_url":"https://github.com/compuphase/pawn/pull/14","id":154873024,"number":14,"title":"fix strcmp returning wrong values","user":{"login":"Daniel-Cortez","id":5159716,"avatar_url":"https://avatars.githubusercontent.com/u/5159716?v=3","gravatar_id":"","url":"https://api.github.com/users/Daniel-Cortez","html_url":"https://github.com/Daniel-Cortez","followers_url":"https://api.github.com/users/Daniel-Cortez/followers","following_url":"https://api.github.com/users/Daniel-Cortez/following{/other_user}","gists_url":"https://api.github.com/users/Daniel-Cortez/gists{/gist_id}","starred_url":"https://api.github.com/users/Daniel-Cortez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Daniel-Cortez/subscriptions","organizations_url":"https://api.github.com/users/Daniel-Cortez/orgs","repos_url":"https://api.github.com/users/Daniel-Cortez/repos","events_url":"https://api.github.com/users/Daniel-Cortez/events{/privacy}","received_events_url":"https://api.github.com/users/Daniel-Cortez/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-14T20:03:11Z","updated_at":"2016-05-15T14:31:52Z","closed_at":"2016-05-15T14:31:52Z","pull_request":{"url":"https://api.github.com/repos/compuphase/pawn/pulls/14","html_url":"https://github.com/compuphase/pawn/pull/14","diff_url":"https://github.com/compuphase/pawn/pull/14.diff","patch_url":"https://github.com/compuphase/pawn/pull/14.patch"},"body":"Fixes #13.\r\nTest code:\r\n```Pawn\r\n#include <console>\r\n#include <string>\r\nmain()\r\n{\r\n\tstatic const test_strings[4]{12} = [\"\", \"123\", \"abc\", \"abcde\"];\r\n\tfor (new i = 0; i < sizeof(test_strings); ++i)\r\n\t\tfor (new j = 0; j < sizeof(test_strings); ++j)\r\n\t\t\tprintf(\"strcmp(\\\"%s\\\" \\\"%s\\\"): %d\\n\", test_strings[i], test_strings[j],\r\n\t\t\t\tstrcmp(test_strings[i], test_strings[j]));\r\n}\r\n```\r\nOutput:\r\n```\r\nstrcmp(\"\" \"\"): 0\r\nstrcmp(\"\" \"123\"): -1\r\nstrcmp(\"\" \"abc\"): -1\r\nstrcmp(\"\" \"abcde\"): -1\r\nstrcmp(\"123\" \"\"): 1\r\nstrcmp(\"123\" \"123\"): 0\r\nstrcmp(\"123\" \"abc\"): -1\r\nstrcmp(\"123\" \"abcde\"): -1\r\nstrcmp(\"abc\" \"\"): 1\r\nstrcmp(\"abc\" \"123\"): 1\r\nstrcmp(\"abc\" \"abc\"): 0\r\nstrcmp(\"abc\" \"abcde\"): -1\r\nstrcmp(\"abcde\" \"\"): 1\r\nstrcmp(\"abcde\" \"123\"): 1\r\nstrcmp(\"abcde\" \"abc\"): 1\r\nstrcmp(\"abcde\" \"abcde\"): 0\r\n```"},"comment":{"url":"https://api.github.com/repos/compuphase/pawn/issues/comments/219289124","html_url":"https://github.com/compuphase/pawn/pull/14#issuecomment-219289124","issue_url":"https://api.github.com/repos/compuphase/pawn/issues/14","id":219289124,"user":{"login":"compuphase","id":11457347,"avatar_url":"https://avatars.githubusercontent.com/u/11457347?v=3","gravatar_id":"","url":"https://api.github.com/users/compuphase","html_url":"https://github.com/compuphase","followers_url":"https://api.github.com/users/compuphase/followers","following_url":"https://api.github.com/users/compuphase/following{/other_user}","gists_url":"https://api.github.com/users/compuphase/gists{/gist_id}","starred_url":"https://api.github.com/users/compuphase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/compuphase/subscriptions","organizations_url":"https://api.github.com/users/compuphase/orgs","repos_url":"https://api.github.com/users/compuphase/repos","events_url":"https://api.github.com/users/compuphase/events{/privacy}","received_events_url":"https://api.github.com/users/compuphase/received_events","type":"User","site_admin":false},"created_at":"2016-05-15T14:31:52Z","updated_at":"2016-05-15T14:31:52Z","body":"I have committed a fix. It is not the same as yours. I think your fix would still fail in a case like:\r\n    strcmp(\"abcdef\", \"abc\", 5)\r\n"}}