From 96dababb9c7b2c5eb7c4e620cfcae6c1f69ab074 Mon Sep 17 00:00:00 2001 From: stmctommyau Date: Mon, 25 Sep 2023 11:40:23 +0800 Subject: [PATCH] fix --- utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.h b/utils.h index 69b323f..5846ffd 100644 --- a/utils.h +++ b/utils.h @@ -35,7 +35,7 @@ char * welcome_message(void * ptr){ //cross compatible if(!ptr){//if fp is NULL return "><\n"; } - if(strlen(ptr)){// if ptr a string or file + if(((FILE*)ptr)!=stdout){// if ptr a string or stdout sprintf(ptr,"><\n");//welcome message }else{ fprintf(ptr,"><\n");//welcome message