|
From: Crossfire C. r. messages.
<cro...@li...> - 2009-10-24 22:11:42
|
Revision: 12226
http://crossfire.svn.sourceforge.net/crossfire/?rev=12226&view=rev
Author: akirschbaum
Date: 2009-10-24 22:11:35 +0000 (Sat, 24 Oct 2009)
Log Message:
-----------
Fix checks for incorrect/missing parameters of 'abil' command.
Modified Paths:
--------------
server/trunk/ChangeLog
server/trunk/server/c_wiz.c
Modified: server/trunk/ChangeLog
===================================================================
--- server/trunk/ChangeLog 2009-10-24 22:07:07 UTC (rev 12225)
+++ server/trunk/ChangeLog 2009-10-24 22:11:35 UTC (rev 12226)
@@ -14,6 +14,9 @@
else. With this, include the file(s) that you changed.
------------------------------------------------------------------------------
+Fix checks for incorrect/missing parameters of 'abil' command.
+Andreas Kirschbaum 2009-10-25
+
Adapt regression test to changed spell parameters (r12127).
Andreas Kirschbaum 2009-10-24
Modified: server/trunk/server/c_wiz.c
===================================================================
--- server/trunk/server/c_wiz.c 2009-10-24 22:07:07 UTC (rev 12225)
+++ server/trunk/server/c_wiz.c 2009-10-24 22:11:35 UTC (rev 12226)
@@ -1602,14 +1602,14 @@
thing[0] = '\0';
thing2[0] = '\0';
if (params == NULL
- || !sscanf(params, "%s %s %d", thing, thing2, &iii)
- || thing == NULL) {
+ || sscanf(params, "%s %s %d", thing, thing2, &iii) != 3
+ || thing[0] == '\0') {
draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR,
"Who?", NULL);
return 1;
}
- if (thing2 == NULL) {
+ if (thing2[0] == '\0') {
draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR,
"You can't change that.", NULL);
return 1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|