if (lua_gettop(L) > 1) {
offset = MAY_LJMP(luaL_checkinteger(L, 2));
if (offset < 0)
- offset = MAX(0, input + offset);
+ offset = MAX(0, (int)input + offset);
offset += output;
if (offset < output || offset > input + output) {
lua_pushfstring(L, "offset out of range.");
if (lua_gettop(L) > 1) {
offset = MAY_LJMP(luaL_checkinteger(L, 2));
if (offset < 0)
- offset = MAX(0, input + offset);
+ offset = MAX(0, (int)input + offset);
offset += output;
if (offset < output || offset > input + output) {
lua_pushfstring(L, "offset out of range.");
if (lua_gettop(L) > 2) {
offset = MAY_LJMP(luaL_checkinteger(L, 3));
if (offset < 0)
- offset = MAX(0, input + offset);
+ offset = MAX(0, (int)input + offset);
offset += output;
-
if (offset < output || offset > output + input) {
lua_pushfstring(L, "offset out of range.");
WILL_LJMP(lua_error(L));
if (lua_gettop(L) > 2) {
offset = MAY_LJMP(luaL_checkinteger(L, 3));
if (offset < 0)
- offset = MAX(0, input + offset);
+ offset = MAX(0, (int)input + offset);
offset += output;
if (offset < output || offset > input + output) {
lua_pushfstring(L, "offset out of range.");
if (lua_gettop(L) > 2) {
offset = MAY_LJMP(luaL_checkinteger(L, 3));
if (offset < 0)
- offset = MAX(0, input + offset);
+ offset = MAX(0, (int)input + offset);
offset += output;
if (offset < output || offset > input + output) {
lua_pushfstring(L, "offset out of range.");
if (lua_gettop(L) > 1) {
offset = MAY_LJMP(luaL_checkinteger(L, 2));
if (offset < 0)
- offset = MAX(0, input + offset);
+ offset = MAX(0, (int)input + offset);
offset += output;
if (offset < output || offset > input + output) {
lua_pushfstring(L, "offset out of range.");
if (lua_gettop(L) > 2) {
offset = MAY_LJMP(luaL_checkinteger(L, 3));
if (offset < 0)
- offset = MAX(0, input + offset);
+ offset = MAX(0, (int)input + offset);
offset += output;
-
if (offset < output || offset > output + input) {
lua_pushfstring(L, "offset out of range.");
WILL_LJMP(lua_error(L));
if (lua_gettop(L) > 2) {
offset = MAY_LJMP(luaL_checkinteger(L, 3));
if (offset < 0)
- offset = MAX(0, input + offset);
+ offset = MAX(0, (int)input + offset);
offset += output;
-
if (offset < output || offset > output + input) {
lua_pushfstring(L, "offset out of range.");
WILL_LJMP(lua_error(L));
if (lua_gettop(L) > 2) {
offset = MAY_LJMP(luaL_checkinteger(L, 3));
if (offset < 0)
- offset = MAX(0, input + offset);
+ offset = MAX(0, (int)input + offset);
offset += output;
if (offset < output || offset > input + output) {
lua_pushfstring(L, "offset out of range.");