Commits (3)
......@@ -22,6 +22,7 @@
#ifndef PCBDEFS_HPP_
#define PCBDEFS_HPP_
#include <algorithm> // std::min
#include "endian.hpp"
namespace PCBoard {
......@@ -47,6 +48,7 @@ class string {
char value[size]{};
public:
void operator = (const char* s) {
using std::min;
memset(value, ' ', size);
memcpy(value, s, min(size, strlen(s)));
}
......
......@@ -1532,9 +1532,9 @@ void readmsgs(ulong start, ulong count)
printf("Subj : %s\n",msg.subj);
printf("Attr : %04hX (%s)", msg.hdr.attr, smb_msgattrstr(msg.hdr.attr, tmp, sizeof(tmp)));
if(msg.hdr.auxattr != 0)
printf("\nAux : %08lX (%s)", msg.hdr.auxattr, smb_auxattrstr(msg.hdr.auxattr, tmp, sizeof(tmp)));
printf("\nAux : %08X (%s)", msg.hdr.auxattr, smb_auxattrstr(msg.hdr.auxattr, tmp, sizeof(tmp)));
if(msg.hdr.netattr != 0)
printf("\nNet : %08lX (%s)", msg.hdr.netattr, smb_netattrstr(msg.hdr.netattr, tmp, sizeof(tmp)));
printf("\nNet : %08X (%s)", msg.hdr.netattr, smb_netattrstr(msg.hdr.netattr, tmp, sizeof(tmp)));
if(*msg.to) {
printf("\nTo : %s",msg.to);
if(msg.to_net.type)
......
......@@ -712,7 +712,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
sys.ErrorCorrected = true;
sys.GraphicsMode = (term & NO_EXASCII) ? 'N' : 'Y';
sys.UserNetStatus = (thisnode.misc & NODE_POFF) ? 'U' : 'A'; /* Node chat status ([A]vailable or [U]navailable) */
SAFEPRINTF(tmp, "%u", dte_rate);
SAFEPRINTF(tmp, "%lu", dte_rate);
sys.ModemSpeed = tmp;
sys.CarrierSpeed = connection;
sys.UserRecNo = useron.number;
......