Update dict.c

fix a bug of dict_update.