hooks/timer argument is now zero padded instead of space padded
2005-06-23 Clinton Ebadi <clinton@unknownlamer.org>
2005-06-23 Clinton Ebadi <clinton@unknownlamer.org>
+ * source/Bot.C (waitForInput): Use %02d when formatting
+ Hooks::TIMER argument instead of %2d, and switch to snprintf to
+ enforce max length
+
* bobot++.texinfo (Hooks): Clarified intro text about hooks (order
of processing).
* bobot++.texinfo (Hooks): Clarified intro text about hooks (order
of processing).
if (thisTime->tm_sec == 0)
{
char s[6];
if (thisTime->tm_sec == 0)
{
char s[6];
- std::sprintf(s, "%2d:%2d", thisTime->tm_hour, thisTime->tm_min);
+ std::snprintf(s, 6, "%02d:%02d", thisTime->tm_hour, thisTime->tm_min);
botInterp->RunHooks(Hook::TIMER, String(s),
scm_list_n (Utils::str2scm (std::string (s)),
botInterp->RunHooks(Hook::TIMER, String(s),
scm_list_n (Utils::str2scm (std::string (s)),