Skip to content

Commit

Permalink
Fixed bug where logging while in the rst entry with a blank rst crashed
Browse files Browse the repository at this point in the history
the program when it tried to convert the null string to an integer.
A blank rst is now logged as 599.
  • Loading branch information
Kevin Schmidt committed Jun 21, 2023
1 parent 77ed555 commit 9c316a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/cwsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def __init__(self,parent=None):
callval = ToUpperRegularExpressionValidator(
QtCore.QRegularExpression(r'^[a-zA-Z0-9/?]*$'),self)
nrval = QtGui.QRegularExpressionValidator(
QtCore.QRegularExpression(r'^[0-9]*$'),self)
QtCore.QRegularExpression(r'^[0-9]+$'),self)
trexval = ToUpperRegularExpressionValidator(
QtCore.QRegularExpression(r'^\ *[0-9]*\ *[0-9]*\ *[a-zA-Z0-9/?]*$'),self)
self.callLine.setValidator(callval)
Expand Down Expand Up @@ -887,6 +887,8 @@ def saveQso(self):
self._callsent = False
self._rawQsoCount += 1
h,m,s = self.contest.time()
if self._rst == "":
self._rst = "599"
self._lastLog = [self._hiscall, int(self._nr), int(self._rst)]
time.sleep(0) #yield
rawPfx = self.prefix.getPrefix(self._hiscall)
Expand Down

0 comments on commit 9c316a0

Please sign in to comment.