Skip to content

Commit

Permalink
IPC did not worked with floating point values
Browse files Browse the repository at this point in the history
  • Loading branch information
untoxa committed Dec 5, 2020
1 parent 7260832 commit e846734
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/lua_buffers.pas
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ procedure stack2buf(astate: Lua_State; aindex: longint; acodec: tLuaCodec);
acodec.write(LUA_TBOOLEAN, @tmpb, sizeof(tmpb));
end;
LUA_TNUMBER : if lua_isinteger(astate, aindex) then begin
tmpd:= lua_tonumber(astate, aindex);
acodec.write(LUA_TNUMBER, @tmpd, sizeof(tmpd));
end else begin
tmpi:= lua_tointeger(astate, aindex);
acodec.write(LUA_TINTEGER, @tmpi, sizeof(tmpi));
end else begin
tmpd:= lua_tonumber(astate, aindex);
acodec.write(LUA_TNUMBER, @tmpd, sizeof(tmpd));
end;
LUA_TSTRING : begin
tmps:= lua_tolstring(astate, aindex, len);
Expand Down

0 comments on commit e846734

Please sign in to comment.