{"action":"created","comment":{"url":"https://api.github.com/repos/Vita3K/Vita3K/pulls/comments/182718108","pull_request_review_id":113569916,"id":182718108,"diff_hunk":"@@ -15,10 +15,26 @@\n // with this program; if not, write to the Free Software Foundation, Inc.,\n // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n \n+#include <cstdlib>\n+#include <ctime>\n+\n #include \"SceLibRng.h\"\n \n-EXPORT(int, sceKernelGetRandomNumber) {\n-    return unimplemented(\"sceKernelGetRandomNumber\");\n+\n+EXPORT(int, sceKernelGetRandomNumber, void *output, unsigned size) {\n+    srand(time(nullptr));\n+\n+    if (size > 64) {\n+        return -1;\n+    }\n+\n+    int* int_output = reinterpret_cast<int*>(output);\n+\n+    for (unsigned int i = 0; i < size; i ++) {","path":"src/emulator/modules/SceLibKernel/SceLibRng.cpp","position":21,"original_position":21,"commit_id":"960e39021e0fbd795bdc3472ff26298201739966","original_commit_id":"960e39021e0fbd795bdc3472ff26298201739966","user":{"login":"bentokun","id":25717050,"avatar_url":"https://avatars1.githubusercontent.com/u/25717050?v=4","gravatar_id":"","url":"https://api.github.com/users/bentokun","html_url":"https://github.com/bentokun","followers_url":"https://api.github.com/users/bentokun/followers","following_url":"https://api.github.com/users/bentokun/following{/other_user}","gists_url":"https://api.github.com/users/bentokun/gists{/gist_id}","starred_url":"https://api.github.com/users/bentokun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bentokun/subscriptions","organizations_url":"https://api.github.com/users/bentokun/orgs","repos_url":"https://api.github.com/users/bentokun/repos","events_url":"https://api.github.com/users/bentokun/events{/privacy}","received_events_url":"https://api.github.com/users/bentokun/received_events","type":"User","site_admin":false},"body":"I think it should be casted to char, working on it.","created_at":"2018-04-19T11:44:34Z","updated_at":"2018-04-19T11:44:34Z","html_url":"https://github.com/Vita3K/Vita3K/pull/167#discussion_r182718108","pull_request_url":"https://api.github.com/repos/Vita3K/Vita3K/pulls/167","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Vita3K/Vita3K/pulls/comments/182718108"},"html":{"href":"https://github.com/Vita3K/Vita3K/pull/167#discussion_r182718108"},"pull_request":{"href":"https://api.github.com/repos/Vita3K/Vita3K/pulls/167"}},"in_reply_to_id":182717014},"pull_request":{"url":"https://api.github.com/repos/Vita3K/Vita3K/pulls/167","id":182747350,"html_url":"https://github.com/Vita3K/Vita3K/pull/167","diff_url":"https://github.com/Vita3K/Vita3K/pull/167.diff","patch_url":"https://github.com/Vita3K/Vita3K/pull/167.patch","issue_url":"https://api.github.com/repos/Vita3K/Vita3K/issues/167","number":167,"state":"open","locked":false,"title":"Implement sceKernelGetRandomNumber","user":{"login":"bentokun","id":25717050,"avatar_url":"https://avatars1.githubusercontent.com/u/25717050?v=4","gravatar_id":"","url":"https://api.github.com/users/bentokun","html_url":"https://github.com/bentokun","followers_url":"https://api.github.com/users/bentokun/followers","following_url":"https://api.github.com/users/bentokun/following{/other_user}","gists_url":"https://api.github.com/users/bentokun/gists{/gist_id}","starred_url":"https://api.github.com/users/bentokun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bentokun/subscriptions","organizations_url":"https://api.github.com/users/bentokun/orgs","repos_url":"https://api.github.com/users/bentokun/repos","events_url":"https://api.github.com/users/bentokun/events{/privacy}","received_events_url":"https://api.github.com/users/bentokun/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-19T11:33:07Z","updated_at":"2018-04-19T11:44:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"abd96fc7ff9d83d524dd207627f6afbe74c540d3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Vita3K/Vita3K/pulls/167/commits","review_comments_url":"https://api.github.com/repos/Vita3K/Vita3K/pulls/167/comments","review_comment_url":"https://api.github.com/repos/Vita3K/Vita3K/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Vita3K/Vita3K/issues/167/comments","statuses_url":"https://api.github.com/repos/Vita3K/Vita3K/statuses/960e39021e0fbd795bdc3472ff26298201739966","head":{"label":"bentokun:kernel-random","ref":"kernel-random","sha":"960e39021e0fbd795bdc3472ff26298201739966","user":{"login":"bentokun","id":25717050,"avatar_url":"https://avatars1.githubusercontent.com/u/25717050?v=4","gravatar_id":"","url":"https://api.github.com/users/bentokun","html_url":"https://github.com/bentokun","followers_url":"https://api.github.com/users/bentokun/followers","following_url":"https://api.github.com/users/bentokun/following{/other_user}","gists_url":"https://api.github.com/users/bentokun/gists{/gist_id}","starred_url":"https://api.github.com/users/bentokun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bentokun/subscriptions","organizations_url":"https://api.github.com/users/bentokun/orgs","repos_url":"https://api.github.com/users/bentokun/repos","events_url":"https://api.github.com/users/bentokun/events{/privacy}","received_events_url":"https://api.github.com/users/bentokun/received_events","type":"User","site_admin":false},"repo":{"id":121784722,"name":"Vita3K","full_name":"bentokun/Vita3K","owner":{"login":"bentokun","id":25717050,"avatar_url":"https://avatars1.githubusercontent.com/u/25717050?v=4","gravatar_id":"","url":"https://api.github.com/users/bentokun","html_url":"https://github.com/bentokun","followers_url":"https://api.github.com/users/bentokun/followers","following_url":"https://api.github.com/users/bentokun/following{/other_user}","gists_url":"https://api.github.com/users/bentokun/gists{/gist_id}","starred_url":"https://api.github.com/users/bentokun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bentokun/subscriptions","organizations_url":"https://api.github.com/users/bentokun/orgs","repos_url":"https://api.github.com/users/bentokun/repos","events_url":"https://api.github.com/users/bentokun/events{/privacy}","received_events_url":"https://api.github.com/users/bentokun/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bentokun/Vita3K","description":"Arficats at: https://ci.appveyor.com/project/bentokun/vita3k","fork":true,"url":"https://api.github.com/repos/bentokun/Vita3K","forks_url":"https://api.github.com/repos/bentokun/Vita3K/forks","keys_url":"https://api.github.com/repos/bentokun/Vita3K/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bentokun/Vita3K/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bentokun/Vita3K/teams","hooks_url":"https://api.github.com/repos/bentokun/Vita3K/hooks","issue_events_url":"https://api.github.com/repos/bentokun/Vita3K/issues/events{/number}","events_url":"https://api.github.com/repos/bentokun/Vita3K/events","assignees_url":"https://api.github.com/repos/bentokun/Vita3K/assignees{/user}","branches_url":"https://api.github.com/repos/bentokun/Vita3K/branches{/branch}","tags_url":"https://api.github.com/repos/bentokun/Vita3K/tags","blobs_url":"https://api.github.com/repos/bentokun/Vita3K/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bentokun/Vita3K/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bentokun/Vita3K/git/refs{/sha}","trees_url":"https://api.github.com/repos/bentokun/Vita3K/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bentokun/Vita3K/statuses/{sha}","languages_url":"https://api.github.com/repos/bentokun/Vita3K/languages","stargazers_url":"https://api.github.com/repos/bentokun/Vita3K/stargazers","contributors_url":"https://api.github.com/repos/bentokun/Vita3K/contributors","subscribers_url":"https://api.github.com/repos/bentokun/Vita3K/subscribers","subscription_url":"https://api.github.com/repos/bentokun/Vita3K/subscription","commits_url":"https://api.github.com/repos/bentokun/Vita3K/commits{/sha}","git_commits_url":"https://api.github.com/repos/bentokun/Vita3K/git/commits{/sha}","comments_url":"https://api.github.com/repos/bentokun/Vita3K/comments{/number}","issue_comment_url":"https://api.github.com/repos/bentokun/Vita3K/issues/comments{/number}","contents_url":"https://api.github.com/repos/bentokun/Vita3K/contents/{+path}","compare_url":"https://api.github.com/repos/bentokun/Vita3K/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bentokun/Vita3K/merges","archive_url":"https://api.github.com/repos/bentokun/Vita3K/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bentokun/Vita3K/downloads","issues_url":"https://api.github.com/repos/bentokun/Vita3K/issues{/number}","pulls_url":"https://api.github.com/repos/bentokun/Vita3K/pulls{/number}","milestones_url":"https://api.github.com/repos/bentokun/Vita3K/milestones{/number}","notifications_url":"https://api.github.com/repos/bentokun/Vita3K/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bentokun/Vita3K/labels{/name}","releases_url":"https://api.github.com/repos/bentokun/Vita3K/releases{/id}","deployments_url":"https://api.github.com/repos/bentokun/Vita3K/deployments","created_at":"2018-02-16T18:19:46Z","updated_at":"2018-04-02T15:20:19Z","pushed_at":"2018-04-02T16:22:50Z","git_url":"git://github.com/bentokun/Vita3K.git","ssh_url":"git@github.com:bentokun/Vita3K.git","clone_url":"https://github.com/bentokun/Vita3K.git","svn_url":"https://github.com/bentokun/Vita3K","homepage":"https://Vita3K.github.io/","size":42139,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Vita3K:master","ref":"master","sha":"44e1fd68ee004f23fd0a3db2d27bde3e71a09909","user":{"login":"Vita3K","id":34121543,"avatar_url":"https://avatars1.githubusercontent.com/u/34121543?v=4","gravatar_id":"","url":"https://api.github.com/users/Vita3K","html_url":"https://github.com/Vita3K","followers_url":"https://api.github.com/users/Vita3K/followers","following_url":"https://api.github.com/users/Vita3K/following{/other_user}","gists_url":"https://api.github.com/users/Vita3K/gists{/gist_id}","starred_url":"https://api.github.com/users/Vita3K/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vita3K/subscriptions","organizations_url":"https://api.github.com/users/Vita3K/orgs","repos_url":"https://api.github.com/users/Vita3K/repos","events_url":"https://api.github.com/users/Vita3K/events{/privacy}","received_events_url":"https://api.github.com/users/Vita3K/received_events","type":"Organization","site_admin":false},"repo":{"id":119111364,"name":"Vita3K","full_name":"Vita3K/Vita3K","owner":{"login":"Vita3K","id":34121543,"avatar_url":"https://avatars1.githubusercontent.com/u/34121543?v=4","gravatar_id":"","url":"https://api.github.com/users/Vita3K","html_url":"https://github.com/Vita3K","followers_url":"https://api.github.com/users/Vita3K/followers","following_url":"https://api.github.com/users/Vita3K/following{/other_user}","gists_url":"https://api.github.com/users/Vita3K/gists{/gist_id}","starred_url":"https://api.github.com/users/Vita3K/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vita3K/subscriptions","organizations_url":"https://api.github.com/users/Vita3K/orgs","repos_url":"https://api.github.com/users/Vita3K/repos","events_url":"https://api.github.com/users/Vita3K/events{/privacy}","received_events_url":"https://api.github.com/users/Vita3K/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Vita3K/Vita3K","description":"Experimental PlayStation Vita emulator","fork":false,"url":"https://api.github.com/repos/Vita3K/Vita3K","forks_url":"https://api.github.com/repos/Vita3K/Vita3K/forks","keys_url":"https://api.github.com/repos/Vita3K/Vita3K/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vita3K/Vita3K/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vita3K/Vita3K/teams","hooks_url":"https://api.github.com/repos/Vita3K/Vita3K/hooks","issue_events_url":"https://api.github.com/repos/Vita3K/Vita3K/issues/events{/number}","events_url":"https://api.github.com/repos/Vita3K/Vita3K/events","assignees_url":"https://api.github.com/repos/Vita3K/Vita3K/assignees{/user}","branches_url":"https://api.github.com/repos/Vita3K/Vita3K/branches{/branch}","tags_url":"https://api.github.com/repos/Vita3K/Vita3K/tags","blobs_url":"https://api.github.com/repos/Vita3K/Vita3K/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vita3K/Vita3K/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vita3K/Vita3K/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vita3K/Vita3K/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vita3K/Vita3K/statuses/{sha}","languages_url":"https://api.github.com/repos/Vita3K/Vita3K/languages","stargazers_url":"https://api.github.com/repos/Vita3K/Vita3K/stargazers","contributors_url":"https://api.github.com/repos/Vita3K/Vita3K/contributors","subscribers_url":"https://api.github.com/repos/Vita3K/Vita3K/subscribers","subscription_url":"https://api.github.com/repos/Vita3K/Vita3K/subscription","commits_url":"https://api.github.com/repos/Vita3K/Vita3K/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vita3K/Vita3K/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vita3K/Vita3K/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vita3K/Vita3K/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vita3K/Vita3K/contents/{+path}","compare_url":"https://api.github.com/repos/Vita3K/Vita3K/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vita3K/Vita3K/merges","archive_url":"https://api.github.com/repos/Vita3K/Vita3K/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vita3K/Vita3K/downloads","issues_url":"https://api.github.com/repos/Vita3K/Vita3K/issues{/number}","pulls_url":"https://api.github.com/repos/Vita3K/Vita3K/pulls{/number}","milestones_url":"https://api.github.com/repos/Vita3K/Vita3K/milestones{/number}","notifications_url":"https://api.github.com/repos/Vita3K/Vita3K/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vita3K/Vita3K/labels{/name}","releases_url":"https://api.github.com/repos/Vita3K/Vita3K/releases{/id}","deployments_url":"https://api.github.com/repos/Vita3K/Vita3K/deployments","created_at":"2018-01-26T22:45:05Z","updated_at":"2018-04-19T11:24:35Z","pushed_at":"2018-04-19T11:33:07Z","git_url":"git://github.com/Vita3K/Vita3K.git","ssh_url":"git@github.com:Vita3K/Vita3K.git","clone_url":"https://github.com/Vita3K/Vita3K.git","svn_url":"https://github.com/Vita3K/Vita3K","homepage":"https://Vita3K.github.io/","size":25448,"stargazers_count":437,"watchers_count":437,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":46,"mirror_url":null,"archived":false,"open_issues_count":36,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":46,"open_issues":36,"watchers":437,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Vita3K/Vita3K/pulls/167"},"html":{"href":"https://github.com/Vita3K/Vita3K/pull/167"},"issue":{"href":"https://api.github.com/repos/Vita3K/Vita3K/issues/167"},"comments":{"href":"https://api.github.com/repos/Vita3K/Vita3K/issues/167/comments"},"review_comments":{"href":"https://api.github.com/repos/Vita3K/Vita3K/pulls/167/comments"},"review_comment":{"href":"https://api.github.com/repos/Vita3K/Vita3K/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Vita3K/Vita3K/pulls/167/commits"},"statuses":{"href":"https://api.github.com/repos/Vita3K/Vita3K/statuses/960e39021e0fbd795bdc3472ff26298201739966"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"bentokun"}}