{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/172","labels_url":"https://api.github.com/repos/chrsmith/bwapi/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/bwapi/issues/172/comments","events_url":"https://api.github.com/repos/chrsmith/bwapi/issues/172/events","html_url":"https://github.com/chrsmith/bwapi/issues/172","id":58275017,"number":172,"title":"Wrong data in AIModule::onSendText(std::string text)","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Priority-Low","name":"Priority-Low","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-19T21:45:47Z","updated_at":"2015-02-19T21:45:48Z","closed_at":null,"body":"```\nWhat steps will reproduce the problem?\n1. compile the ExampleAIModule in BWAPI2.4beta (VC++2008)\n2. run it in MY machine (Windows XP sp3) with any map.\n3. type in anything, the text would be all the same, wrong data.\n\nWhat is the expected output? What do you see instead?\nin short, the function argument text is not right. whatever I typed in the \ngame, the text would be a three chars string: \"lu_\". The first one seems to \nbe the same as ordinary 'l', the second one is u with a check above it, and \nthe third one is a control char. Therefore:\nBroodwar->printf(\"!%s!\", text);\nwill give something like:\n!lu                                             !(most right of the screen)\n\nWhat version of the product are you using? On what operating system?\nBWAPI 2.4 in Windows XP sp3\n\nPlease provide any additional information below.\n```\n\n-----\nOriginal issue reported on code.google.com by `hero...@gmail.com` on 22 Dec 2009 at 12:20"},"comment":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/comments/75143830","html_url":"https://github.com/chrsmith/bwapi/issues/172#issuecomment-75143830","issue_url":"https://api.github.com/repos/chrsmith/bwapi/issues/172","id":75143830,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-02-19T21:45:48Z","updated_at":"2015-02-19T21:45:48Z","body":"```\nsorry for the confusion, but\nBroodwar->printf(\"%s\", text)\nWAS the one I tried. However, I soon noticed the c_str() thing and used\nBroodwar->printf(\"%s\", text.c_str())\ninstead.\nThe phenomenon I described above is for the later case.\n\nI will try BWAPI 2.5 soon and hopefully eliminate this bug.\n```\n\n-----\nOriginal comment by `hero...@gmail.com` on 22 Dec 2009 at 3:31"}}