diff options
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | src/map/storage.c | 4 |
2 files changed, 7 insertions, 5 deletions
@@ -4,7 +4,7 @@ ifeq ($(shell uname -m), x86_64) M32=-m32 endif -CC = gcc ${M32} -pipe +CC = gcc ${M32} PLATFORM = $(shell uname) @@ -14,14 +14,14 @@ else MAKE = make endif -OPT = -g -fno-strict-aliasing -O2 ${M32} +OPT = -pipe -g -fno-strict-aliasing -O2 -Wall ifeq ($(findstring CYGWIN,$(PLATFORM)), CYGWIN) OS_TYPE = -DCYGWIN -CFLAGS = $(OPT) -Wall -fno-strict-aliasing -DFD_SETSIZE=4096 -I../common $(PACKETDEF) $(OS_TYPE) +CFLAGS = $(OPT) -DFD_SETSIZE=4096 -I../common $(PACKETDEF) $(OS_TYPE) else OS_TYPE = -CFLAGS = $(OPT) -Wall -fno-strict-aliasing -Wno-pointer-sign -I../common $(PACKETDEF) $(OS_TYPE) +CFLAGS = $(OPT) -fstack-protector -Wno-pointer-sign -I../common $(PACKETDEF) $(OS_TYPE) endif MKDEF = CC="$(CC)" CFLAGS="$(CFLAGS)" diff --git a/src/map/storage.c b/src/map/storage.c index 53b5bc7..25ecd90 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -251,9 +251,11 @@ int storage_storageadd(struct map_session_data *sd,int index,int amount) return 0; // log_tostorage(sd, index, 0); - if(storage_additem(sd,stor,&sd->status.inventory[index],amount)==0) + if(storage_additem(sd,stor,&sd->status.inventory[index],amount)==0) { // remove item from inventory + pc_unequipinvyitem(sd,index,1); pc_delitem(sd,index,amount,0); + } return 1; } |