adjustments, still breaks on ubuntu,

This commit is contained in:
iceman1001 2018-02-03 22:47:17 +01:00
parent 0234ca5654
commit 7de458486f
2 changed files with 6 additions and 7 deletions

View file

@ -459,15 +459,14 @@ static int l_reveng_models(lua_State *L){
// This array needs to be adjusted if RevEng adds more crc-models.
uint8_t width[102];
memset(width, 0, sizeof(width));
// This array needs to be adjusted if RevEng adds more crc-models.
char *models[102];
width[0] = in_width;
int ans = GetModels(models, &count, width);
if (!ans) {
return returnToLuaWithError(L, "Didn't find any models");
}
if (!GetModels(models, &count, width))
return returnToLuaWithError(L, "didn't find any models");
lua_newtable(L);
for (int i = 0; i < count; i++){

View file

@ -58,8 +58,8 @@ function main(args)
print('')
print( ('%-20s| %-16s| %s'):format('Model','CRC', 'CRC reverse','bigEnd', 'bigEnd','little','little'))
print( string.rep('-',60) )
local lists = core.reveng_models(width)
if lists == nil then return oops("Couldn't find any CRC algos with that width") end
local lists, err = core.reveng_models(width)
if lists == nil then return oops(err) end
for _,i in pairs(lists) do
if string.len(i) > 1 then