[STOCK BUG] Time Played

From: Chris Jacobson (fear@ATHENET.NET)
Date: 01/25/98


Wow this must have been a longstanding bug.

In the act.wizard.c file, function do_stat_char:

You'll find an sprintf call with the following

"Created: [%s], Last Logon: [%s], Played [%dh %dm], Age [%d]\r\n",
                                buf1, buf2, k->player.time.played / 3600,
                                ((k->player.time.played / 3600) % 60), age(k).year);

Note that doing:

k->player.time.played / 3600
IS correct for the hours played.

However,
((k->player.time.played / 3600) % 60)
takes the REMAINDER of the HOURS/60.
Such that you will see time played like,
0h 0m
1h 1m
5h 5m
10h 10m
16h 16m
61h 1m
75h 15m

The CORRECT part of the function should be:

((k->player.time.played % 3600) / 60)

Was simply reversed operands.

- Chris Jacobson


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST