Skip to content

Commit

Permalink
12558 Builtin command "printf" of ksh93 does not behave as specified
Browse files Browse the repository at this point in the history
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Approved by: Dan McDonald <danmcd@joyent.com>
  • Loading branch information
citrus-it committed Mar 16, 2021
1 parent 4162633 commit f9bbf53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions usr/src/contrib/ast/src/cmd/ksh93/bltins/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ int b_print(int argc, char *argv[], Shbltin_t *context)
argv++;
goto skip;
}
argv++;
goto printf;
}
while((n = optget(argv,options))) switch(n)
{
Expand Down Expand Up @@ -273,6 +275,7 @@ int b_print(int argc, char *argv[], Shbltin_t *context)
break;
}
argv += opt_info.index;
printf:
if(error_info.errors || (argc<0 && !(format = *argv++)))
errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0));
if(vflag && format)
Expand Down

0 comments on commit f9bbf53

Please sign in to comment.