{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/12030","labels_url":"https://api.github.com/repos/golang/go/issues/12030/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/12030/comments","events_url":"https://api.github.com/repos/golang/go/issues/12030/events","html_url":"https://github.com/golang/go/issues/12030","id":99155262,"number":12030,"title":"runtime/cgo: sprintf misbehaving","user":{"login":"xicheng","id":825689,"avatar_url":"https://avatars.githubusercontent.com/u/825689?v=3","gravatar_id":"","url":"https://api.github.com/users/xicheng","html_url":"https://github.com/xicheng","followers_url":"https://api.github.com/users/xicheng/followers","following_url":"https://api.github.com/users/xicheng/following{/other_user}","gists_url":"https://api.github.com/users/xicheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xicheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xicheng/subscriptions","organizations_url":"https://api.github.com/users/xicheng/orgs","repos_url":"https://api.github.com/users/xicheng/repos","events_url":"https://api.github.com/users/xicheng/events{/privacy}","received_events_url":"https://api.github.com/users/xicheng/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/2","html_url":"https://github.com/golang/go/milestones/Go1.5Maybe","labels_url":"https://api.github.com/repos/golang/go/milestones/2/labels","id":905114,"number":2,"title":"Go1.5Maybe","description":"Things that might make Go 1.5, but aren't critical.\r\n","creator":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":44,"state":"open","created_at":"2014-12-16T02:39:13Z","updated_at":"2015-08-07T17:53:38Z","due_on":"2015-07-31T04:00:00Z","closed_at":null},"comments":4,"created_at":"2015-08-05T08:52:03Z","updated_at":"2015-08-09T09:48:32Z","closed_at":null,"body":"print any number  aways get 'g'   when I use golua,\r\nI found it is caused by sprinf.\r\n\r\nin lua source code:\r\n#define LUA_NUMBER_SCAN\t\t\"%lf\"\r\n#define LUA_NUMBER_FMT\t\t\"%.14g\"\r\n#define lua_number2str(s,n)\tsprintf((s), LUA_NUMBER_FMT, (n))\r\n#define LUAI_MAXNUMBER2STR\t32 /* 16 digits, sign, point, and \\0 */\r\n\r\nso ,I wrote a  test code:\r\n/*\r\n#include <stdio.h>\r\n\r\nvoid my_print(float a)\r\n{\r\n\tchar buff[32];\r\n\tsprintf(buff,\"%.14g\",a);\r\n\tprintf(\"%s\\n\",buff);\r\n}\r\n*/\r\n\r\nC.my_print(20.5)\r\n\r\nit output  g\r\n\r\ni use go1.5 beta3  on win7 64"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/129147348","html_url":"https://github.com/golang/go/issues/12030#issuecomment-129147348","issue_url":"https://api.github.com/repos/golang/go/issues/12030","id":129147348,"user":{"login":"lixin9311","id":371475,"avatar_url":"https://avatars.githubusercontent.com/u/371475?v=3","gravatar_id":"","url":"https://api.github.com/users/lixin9311","html_url":"https://github.com/lixin9311","followers_url":"https://api.github.com/users/lixin9311/followers","following_url":"https://api.github.com/users/lixin9311/following{/other_user}","gists_url":"https://api.github.com/users/lixin9311/gists{/gist_id}","starred_url":"https://api.github.com/users/lixin9311/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lixin9311/subscriptions","organizations_url":"https://api.github.com/users/lixin9311/orgs","repos_url":"https://api.github.com/users/lixin9311/repos","events_url":"https://api.github.com/users/lixin9311/events{/privacy}","received_events_url":"https://api.github.com/users/lixin9311/received_events","type":"User","site_admin":false},"created_at":"2015-08-09T09:48:32Z","updated_at":"2015-08-09T09:48:32Z","body":"same issue with go 1.5 rc1 and mingw64 on Win7-64."}}