Commit Diff


commit - 08086ac47fa863be7593aeb3a5637197bd4c3192
commit + 652f7308666a765b402ca05df725c6fc9f7600c9
blob - 452d714cbb90c5e2f8a58324922027496873445c
blob + fc0157940eceda9cf5192e1a537691ab3da52c63
--- script.c
+++ script.c
@@ -640,6 +640,9 @@ val_cast(struct value *a, int totype)
 		return EVAL_OK;						\
 	} while (0)
 
+	if (a->type == totype)
+		return EVAL_OK;
+
 	if (!val_isnum(a)) {
 		before_printing();
 		fprintf(stderr, "can't cast ");