{"action":"closed","issue":{"url":"https://api.github.com/repos/eggheads/eggdrop/issues/517","repository_url":"https://api.github.com/repos/eggheads/eggdrop","labels_url":"https://api.github.com/repos/eggheads/eggdrop/issues/517/labels{/name}","comments_url":"https://api.github.com/repos/eggheads/eggdrop/issues/517/comments","events_url":"https://api.github.com/repos/eggheads/eggdrop/issues/517/events","html_url":"https://github.com/eggheads/eggdrop/issues/517","id":323426458,"node_id":"MDU6SXNzdWUzMjM0MjY0NTg=","number":517,"title":"Fatal (crash) bug: RAND","user":{"login":"maimizuno","id":8587591,"node_id":"MDQ6VXNlcjg1ODc1OTE=","avatar_url":"https://avatars0.githubusercontent.com/u/8587591?v=4","gravatar_id":"","url":"https://api.github.com/users/maimizuno","html_url":"https://github.com/maimizuno","followers_url":"https://api.github.com/users/maimizuno/followers","following_url":"https://api.github.com/users/maimizuno/following{/other_user}","gists_url":"https://api.github.com/users/maimizuno/gists{/gist_id}","starred_url":"https://api.github.com/users/maimizuno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maimizuno/subscriptions","organizations_url":"https://api.github.com/users/maimizuno/orgs","repos_url":"https://api.github.com/users/maimizuno/repos","events_url":"https://api.github.com/users/maimizuno/events{/privacy}","received_events_url":"https://api.github.com/users/maimizuno/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-16T00:13:29Z","updated_at":"2018-07-30T16:48:52Z","closed_at":"2018-07-30T16:48:52Z","author_association":"NONE","body":"RAND only handles 32-bit requests. Cross over that barrier, and the bot fatally-crashes.\r\n\r\nEdit: This should say: \"the non-zero positive range of a signed 32-bit integer\" (half-open interval: 0,2^31). Negatives and zero do not work. Floats are integer-truncated (floor?).\r\n\r\nThis shows-up when you try to create an arbitrarily high random number using the nice round number \"10000000000\" (10,000,000,000 or 1 + 10 zeroes), which is >= than 2^32.\r\n\r\n[2018-05-15 17:07:29 -0800] \\<Domino\\> do tcl rand 2147483647\r\n[2018-05-15 17:07:30 -0800] -Bot- [TCL (0ms)] 1552702703\r\n[2018-05-15 17:07:31 -0800] \\<Domino\\> do tcl rand 2147483648\r\n[2018-05-15 17:07:33 -0800] * Bot (~Bot@B4O86ED4.28DEC6G9.2975OOCE.IP) Quit (Client exited)\r\n\r\n$ cat DEBUG\r\nDebug (eggdrop v1.8.3) written Wed May 16 02:07:19 2018\r\nPatch level: stable\r\nTcl library: /usr/share/tcltk/tcl8.6\r\nTcl version: 8.6.2 (header version 8.6.2)\r\nTcl is threaded\r\nCompiled with IPv6 support\r\nCompiled with TLS support\r\nConfigure flags: none\r\nCompile flags: gcc -g -O2 -pipe -Wall -I.. -I..  -DHAVE_CONFIG_H -I/usr/include/tcl8.6\r\nLink flags: gcc\r\nStrip flags: touch\r\nContext: tclhash.c/725, []\r\n         tclhash.c/729, [Tcl proc: *raw:irc:msg, param:  $_raw1 $_raw2 $_raw3]\r\n         tclhash.c/725, []\r\n         tclhash.c/729, [Tcl proc: raw_commands, param:  $_pub1 $_pub2 $_pub3 $_pub4 $_pub5]\r\n         tclhash.c/740, []\r\n         tclhash.c/740, []\r\n         tclhash.c/725, []\r\n         tclhash.c/729, [Tcl proc: *raw:irc:msg, param:  $_raw1 $_raw2 $_raw3]\r\n         tclhash.c/725, []\r\n         tclhash.c/729, [Tcl proc: raw_commands, param:  $_pub1 $_pub2 $_pub3 $_pub4 $_pub5]\r\n         tclhash.c/740, []\r\n         tclhash.c/740, []\r\n         tclhash.c/725, []\r\n         tclhash.c/729, [Tcl proc: *raw:irc:msg, param:  $_raw1 $_raw2 $_raw3]\r\n         tclhash.c/725, []\r\n         tclhash.c/729 [Tcl proc: raw_commands, param:  $_pub1 $_pub2 $_pub3 $_pub4 $_pub5]\r\n\r\n[Removed DCCSTAT table and interpretation/breakdown]\r\n\r\nShouldn't this just return a complaint, or process the value as 64-bit internally, just like EXPR does?\r\n"}}
{"actor":{"display_login":"maimizuno"}}