Fossil SCM

Improved the out-of-bounds error message in Th_CallSubCommand().

stephan 2013-05-08 17:12 trunk
Commit 60e9622313890ca4acc29a726762e1410c8cb220
1 file changed +1 -1
+1 -1
--- src/th_lang.c
+++ src/th_lang.c
@@ -897,11 +897,11 @@
897897
return aSub[i].xProc(interp, ctx, argc, argv, argl);
898898
}
899899
}
900900
}
901901
if(argc<2){
902
- Th_ErrorMessage(interp, "Expected sub-command", 0, 0);
902
+ Th_ErrorMessage(interp, "Expected sub-command for", argv[0], argl[0]);
903903
}else{
904904
Th_ErrorMessage(interp, "Expected sub-command, got:", argv[1], argl[1]);
905905
}
906906
return TH_ERROR;
907907
}
908908
--- src/th_lang.c
+++ src/th_lang.c
@@ -897,11 +897,11 @@
897 return aSub[i].xProc(interp, ctx, argc, argv, argl);
898 }
899 }
900 }
901 if(argc<2){
902 Th_ErrorMessage(interp, "Expected sub-command", 0, 0);
903 }else{
904 Th_ErrorMessage(interp, "Expected sub-command, got:", argv[1], argl[1]);
905 }
906 return TH_ERROR;
907 }
908
--- src/th_lang.c
+++ src/th_lang.c
@@ -897,11 +897,11 @@
897 return aSub[i].xProc(interp, ctx, argc, argv, argl);
898 }
899 }
900 }
901 if(argc<2){
902 Th_ErrorMessage(interp, "Expected sub-command for", argv[0], argl[0]);
903 }else{
904 Th_ErrorMessage(interp, "Expected sub-command, got:", argv[1], argl[1]);
905 }
906 return TH_ERROR;
907 }
908

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button