Typen bei Zuweisungen repariert.
LDMud 3.6.1 prueft auch Typen zur Laufzeit bei
Zuweisungen.
Change-Id: I3846154fe79b4b139101443011282e54022ea1d8
diff --git a/std/room/description.c b/std/room/description.c
index 47390e4..9aa0971 100644
--- a/std/room/description.c
+++ b/std/room/description.c
@@ -61,12 +61,10 @@
static void WriteRoomMessage()
{
- int tim, msgid;
- string *room_msg,func;
- mixed *func_msg;
+ int msgid;
- room_msg = (string *)QueryProp(P_ROOM_MSG);
- func_msg = QueryProp(P_FUNC_MSG);
+ string *room_msg = QueryProp(P_ROOM_MSG);
+ <string|string*> func_msg = QueryProp(P_FUNC_MSG);
if ((!room_msg || !sizeof(room_msg)) && !func_msg)
return;
@@ -81,6 +79,7 @@
if (func_msg)
{
+ string func;
if (stringp(func_msg))
func=(string)func_msg;
else
@@ -90,10 +89,9 @@
}
while (remove_call_out("WriteRoomMessage")!=-1);
- tim=QueryProp(P_MSG_PROB);
if(this_object() && sizeof(filter(
deep_inventory(this_object()), #'interactive))) //')))
- call_out("WriteRoomMessage", (tim<15 ? 15 : tim));
+ call_out("WriteRoomMessage", max(15, QueryProp(P_MSG_PROB)));
}
varargs string int_long(mixed viewer,mixed viewpoint,int flags)