1
0
Fork 0

Fix uninitized scalar access

This commit is contained in:
krcroft 2019-11-29 07:04:14 -08:00 committed by Patryk Obara
parent d1a1932a07
commit e5981c3b8e

View file

@ -145,7 +145,7 @@ void CSerialModem::SendNumber(Bitu val) {
void CSerialModem::SendRes(ResTypes response) {
char const * string = nullptr;
Bitu code;
Bitu code = -1;
switch (response)
{
case ResNONE: return;
@ -161,7 +161,7 @@ void CSerialModem::SendRes(ResTypes response) {
if(doresponse == 2 && (response == ResRING ||
response == ResCONNECT || response == ResNOCARRIER))
return;
if(numericresponse)
if(numericresponse && code != -1)
SendNumber(code);
else if (string != nullptr)
SendLine(string);