MRMJ-1: Messenger & Skills fixes

This commit is contained in:
Mind Rapist
2025-12-14 05:17:16 +02:00
parent da619922cb
commit 0f79d890ba
53 changed files with 1387 additions and 231 deletions

View File

@@ -282,7 +282,7 @@ static void read_string (LexState *LS, int del, SemInfo *seminfo) {
else
{
switch (b_current) {
case EOZ:
case (unsigned char)EOZ:
save(LS, '\0', l);
luaX_lexerror(LS, "unfinished string", TK_EOS);
break; /* to avoid warnings */

View File

@@ -10,6 +10,7 @@
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include "lua.h"
@@ -69,7 +70,7 @@ typedef unsigned char lu_byte;
** this is for hashing only; there is no problem if the integer
** cannot hold the whole pointer value
*/
#define IntPoint(p) ((lu_hash)(p))
#define IntPoint(p) ((lu_hash)(uintptr_t)(p))

View File

@@ -67,7 +67,7 @@
** for some types, it is better to avoid modulus by power of 2, as
** they tend to have many 2 factors.
*/
#define hashmod(t,n) (gnode(t, ((n) % ((sizenode(t)-1)|1))))
#define hashmod(t,n) (gnode(t, (lu_hash)((n) % ((sizenode(t)-1)|1))))
#define hashpointer(t,p) hashmod(t, IntPoint(p))

View File

@@ -10,7 +10,7 @@
#include "lobject.h"
#define gnode(t,i) (&(t)->node[i])
#define gnode(t,i) (&(t)->node[(i)])
#define gkey(n) (&(n)->i_key)
#define gval(n) (&(n)->i_val)