Skip to content

Commit f85e44a

Browse files
committed
fix %r print
1 parent ffaa73e commit f85e44a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/dataArgs.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,8 @@ char* strsFormatArg(Args* out_buffs, char* fmt, Arg* arg) {
532532
if (type == ARG_TYPE_POINTER) {
533533
fmt = strsReplace(&buffs, fmt, sym, "%p");
534534
break;
535+
}else{
536+
fmt = strsReplace(&buffs, fmt, sym, "%s");
535537
}
536538
}
537539
}
@@ -553,6 +555,12 @@ char* strsFormatArg(Args* out_buffs, char* fmt, Arg* arg) {
553555
if (ARG_TYPE_NONE == type) {
554556
res = strsFormat(&buffs, PIKA_SPRINTF_BUFF_SIZE, fmt, "None");
555557
goto __exit;
558+
}else{
559+
Arg* arg_str = arg_toStrArg(arg);
560+
if (NULL != arg_str){
561+
res = strsFormat(&buffs, PIKA_SPRINTF_BUFF_SIZE, fmt, arg_getStr(arg_str));
562+
arg_deinit(arg_str);
563+
}
556564
}
557565
__exit:
558566
if (NULL != res) {

0 commit comments

Comments
 (0)