TIP: Click on subject to list as thread! ANSI
echo: golded
to: GOLDED DEVELOPERS
from: WILFRED VAN VELZEN
date: 2016-12-12 18:41:00
subject: Bugs found and fixed

Hi,

I noticed that the users.bbs file of the hudson message base, when created by
my 64 bit golded linux version was 44 bytes bigger (1060) than the file created
by my 32bit golded win version (1016). My tosser complained about the 1060
bytes version...

I found out the structures for writing the users.bbs file use 'long' variables,
which are 64 bits when compiled for a 64 bit target and 32 bits when compiled
for a 32 bit target.

I suggest you apply the patch below, and check the golded sources for more of
these kinds of bugs.

Bye, Wilfred.


diff --git a/goldlib/gall/gusrgold.h b/goldlib/gall/gusrgold.h
index c5d4bb4..1cfd99f 100644
-+- a/goldlib/gall/gusrgold.h
+++ b/goldlib/gall/gusrgold.h
@@ -49,10 +49,10 @@ struct GoldUsers {
   char  city[26];
   byte  reservedzero;
   byte  language;
-  long  pwdcrc;
+  int32_t  pwdcrc;
   word  pwdchangedate;
   word  expiredate;
-  long  highmsgread;
+  int32_t  highmsgread;
   byte  extraspace[2];
   char  dataphone[13];
   char  homephone[13];
@@ -75,7 +75,7 @@ struct GoldUsers {
   short  len;
   word  combinedptr;
   word  aliasptr;
-  long  birthday;
+  int32_t  birthday;
 };


diff --git a/goldlib/gall/gusrhuds.h b/goldlib/gall/gusrhuds.h
index 5d7e413..7bbcc14 100644
-+- a/goldlib/gall/gusrhuds.h
+++ b/goldlib/gall/gusrhuds.h
@@ -50,10 +50,10 @@ struct HudsUsers {
   char  city[26];
   byte  reservedzero;
   byte  language;
-  long  pwdcrc;
+  int32_t  pwdcrc;
   word  pwdchangedate;
   word  expiredate;
-  long  unusedspace;
+  int32_t  unusedspace;
   byte  extraspace[2];
   char  dataphone[13];
   char  homephone[13];
@@ -76,7 +76,7 @@ struct HudsUsers {
   short  len;
   word  combinedptr;  // record number in COMBINED.*
   word  aliasptr;     // record number in ALIAS.*
-  long  birthday;
+  int32_t  birthday;
 };


diff --git a/goldlib/gall/gusrpcb.h b/goldlib/gall/gusrpcb.h
index c88da63..07a5955 100644
-+- a/goldlib/gall/gusrpcb.h
+++ b/goldlib/gall/gusrpcb.h
@@ -75,7 +75,7 @@ struct PcbUsers {
   dword  totalbytesuploaded[2];    // Total Bytes Uploaded
   char  deleteflag;               // Delete Flag (Y or N)
   dword  lastmsgread[40];          // Last Message Read pointer (conference
0-39)
-  long  usersinfrec;              // Record Number of USERS.INF Record
+  int32_t  usersinfrec;              // Record Number of USERS.INF Record
   byte  bitflags2;                // Bit Flags 2 (see below)
   char  reserved[8];              // Reserved (do not use)
   short  lastconferencein;         // Last Conference In (used instead of
offset 192)
@@ -90,9 +90,9 @@ struct PcbUsersInfHdr {
   uint16_t version;               // PCBoard Version Number
   uint16_t numofconf;             // Number of EXTENDED Conferences Allocated
in File
   uint16_t sizeofrec;             // Size of the 'static' PCBoard User Record
-  long  sizeofconf;               // Total Size of PCBoard Conference
Information
+  int32_t  sizeofconf;               // Total Size of PCBoard Conference
Information
   uint16_t numofapps;             // Number of Third Party Apps adding onto
the record
-  long  totalrecsize;             // Total Record Size (PCB and all TPA
components)
+  int32_t  totalrecsize;             // Total Record Size (PCB and all TPA
components)
 };


@@ -106,7 +106,7 @@ struct PcbUsersInfApp {
   uint16_t sizeofrec;             // Size of Application Record information
(0-65535)
   uint16_t sizeofconfrec;         // Size of Conference Record information
(0-65535)
   char  keyword[9];               // Keyword to execute Application (NULL
terminated)
-  long  offset;                   // Offset in User Record where TPA record
begins
+  int32_t  offset;                   // Offset in User Record where TPA record
begins
 };


diff --git a/goldlib/gall/gusrra2.h b/goldlib/gall/gusrra2.h
index e231724..f5cb66c 100644
-+- a/goldlib/gall/gusrra2.h
+++ b/goldlib/gall/gusrra2.h
@@ -54,7 +54,7 @@ struct RA2Users {
   char  address3[51];
   char  handle[36];
   char  comment[81];
-  long  passwordcrc;
+  int32_t  passwordcrc;
   char  dataphone[16];
   char  voicephone[16];
   char  lasttime[6];
@@ -62,17 +62,17 @@ struct RA2Users {
   byte  attribute;
   byte  attribute2;
   byte  flagsx[4];
-  long  credit;
-  long  pending;
+  int32_t  credit;
+  int32_t  pending;
   word  msgsposted;
   word  security;
-  long  lastread;
-  long  nocalls;
-  long  uploads;
-  long  downloads;
-  long  uploadsk;
-  long  downloadsk;
-  long  todayk;
+  int32_t  lastread;
+  int32_t  nocalls;
+  int32_t  uploads;
+  int32_t  downloads;
+  int32_t  uploadsk;
+  int32_t  downloadsk;
+  int32_t  todayk;
   short  elapsed;
   word  screenlength;
   byte  lastpwdchange;
@@ -91,7 +91,7 @@ struct RA2Users {
   word  filegroup;
   byte  lastdobcheck;
   byte  sex;
-  long  xirecord;
+  int32_t  xirecord;
   word  msggroup;
   byte  freespace[48];
 };

--- FMail-W32 1.73.8.53-B20161208
* Origin: Native IPv6 connectable node (2:280/464)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.