First post, by Zorix
Hi everyone.
I was having trouble today with a friend playing Rise of the Triad over modem. The setup.exe modem configuration section would not accept dots or semicolons in the dialer such as: 192.168.1.10:5000. I then tried: 1921680010105000 which dosbox then converted to 192.168.001.010:5000 and would not connect. Testing with Telix confirmed that it works using the dots and semicolon. Only thing I could think of is that the system didn't know how to handle the 0's in the octets. I checked the source code and created a small modification that removed the 0's and tested with success. This was tested on Ubuntu 10.04 and 12.04 with newest SVN release. I have created a diff that you all may find useful. Let me know what you all think about it. Thank you.
--- softmodem.cpp.original 2013-08-25 15:12:21.757106249 -0400
+++ softmodem.cpp 2013-08-25 15:39:11.505100981 -0400
@@ -385,6 +385,19 @@
}
buffer[j] = 0;
foundstr = buffer;
+ // Remove Zeros from beginning of octets
+ char obuffer[128];
+ Bitu k = 0;
+ for (Bitu i=0; i<strlen(foundstr); i++) {
+ if (i < 2 && foundstr[i] == 0)
+ continue;
+ if (foundstr[i] == '0' && foundstr[i-1] == '.')
+ continue;
+ if (foundstr[i] == '0' && foundstr[i-1] == '0' && foundstr[i-2] == '.')
+ continue;
+ obuffer[k++] = foundstr[i];
+ }
+ foundstr = obuffer;
}
}
Dial(foundstr);