MRMJ-1: Messenger & Skills fixes
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user