public
Description: A git clone of the original NetHack source with all my patches in branches
Homepage:
Clone URL: git://github.com/clivecrous/nethack.git
Correct two casts to safer types
Clive Crous (author)
Wed Jul 23 15:04:12 -0700 2008
commit  acf41818586f1172c4b7b3d27dc04f4b96ee0f4f
tree    7059c14810a77e43d751027a67e6666a1ebcb23f
parent  760213214ca898196c403c5b73824c774a485fbe
...
2469
2470
2471
2472
 
2473
2474
2475
 
2476
2477
2478
...
2469
2470
2471
 
2472
2473
2474
 
2475
2476
2477
2478
0
@@ -2469,10 +2469,10 @@ relink_timers(ghostly)
0
                  * and light source code
0
                  */
0
     if (ghostly) {
0
-        if (!lookup_id_mapping((unsigned)curr->arg, &nid))
0
+        if (!lookup_id_mapping((size_t)curr->arg, &nid))
0
                         panic("relink_timers 1b");
0
     } else
0
-        nid = (unsigned) curr->arg;
0
+        nid = (size_t) curr->arg;
0
                 curr->arg = (genericptr_t) find_mid(nid, FM_EVERYWHERE);
0
     if (!curr->arg) panic("cant find m_id %d", nid);
0
     curr->needs_fixup = 0;

Comments