From ac14a2271b7a11dfe32e570d4c58d6766f2e0bd3 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Tue, 5 Nov 2013 21:08:32 +0900 Subject: [PATCH] fix a bug in pic_false_value --- include/picrin/value.h | 2 +- src/value.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/picrin/value.h b/include/picrin/value.h index 1ca74b30..d72eb4f3 100644 --- a/include/picrin/value.h +++ b/include/picrin/value.h @@ -43,7 +43,7 @@ typedef struct { #define pic_ptr(v) ((void *)((long long)0xffffffffffff & (long long)(v).u.data)) #define pic_vtype(v) (((v).u.type_ & 0xf0000)>>16) -#define pic_init_value(v,vtype) (((v).u.type_ = ((unsigned int)0xfff00000|((vtype)<<16))), (v).u.i = 0) +#define pic_init_value(v,vtype) (((v).u.type_ = ((unsigned int)0xfff00000|(unsigned int)((vtype)<<16))), (v).u.i = 0) #else diff --git a/src/value.c b/src/value.c index 2ea602bc..c63ff683 100644 --- a/src/value.c +++ b/src/value.c @@ -116,7 +116,6 @@ pic_false_value() pic_value v; pic_init_value(v, PIC_VTYPE_FALSE); - v.u.data = NULL; return v; }