MCPcopy Create free account
hub / github.com/TASEmulators/fceux / rom_gethash

Function rom_gethash

src/lua-engine.cpp:1494–1503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1492}
1493
1494static int rom_gethash(lua_State *L) {
1495 const char *type = luaL_checkstring(L, 1);
1496 MD5DATA md5hash = GameInfo->MD5;
1497
1498 if (!type) lua_pushstring(L, "");
1499 else if (!stricmp(type, "md5")) lua_pushstring(L, md5_asciistr(md5hash));
1500 else if (!stricmp(type, "base64")) lua_pushstring(L, BytesToString(md5hash.data, MD5DATA::size).c_str());
1501 else lua_pushstring(L, "");
1502 return 1;
1503}
1504
1505static int rom_readbyte(lua_State *L) {
1506 lua_pushinteger(L, FCEU_ReadRomByte(luaL_checkinteger(L,1)));

Callers

nothing calls this directly

Calls 3

lua_pushstringFunction · 0.85
BytesToStringFunction · 0.85
md5_asciistrFunction · 0.50

Tested by

no test coverage detected