Permalink
Browse files

aio: fix open called with wrong number of arguments

  • Loading branch information...
1 parent 57f5be9 commit cbd44b0c4e94000763307c8ec50ae30f89d35173 @afmayer afmayer committed with Jan 23, 2014
Showing with 3 additions and 1 deletion.
  1. +3 −1 jim-aio.c
View
@@ -1023,8 +1023,10 @@ static int JimAioOpenCommand(Jim_Interp *interp, int argc,
{
const char *mode;
- if (argc != 2 && argc != 3)
+ if (argc != 2 && argc != 3) {
Jim_WrongNumArgs(interp, 1, argv, "filename ?mode?");
+ return JIM_ERR;
+ }
mode = (argc == 3) ? Jim_String(argv[2]) : "r";

0 comments on commit cbd44b0

Please sign in to comment.