aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2018-09-15 12:21:17 +0200
committerMichael Buesch <m@bues.ch>2018-09-15 22:00:29 +0200
commit44a3f0fba02013f2feea81ae9739f2e201cb3db8 (patch)
tree5a398594692340c0013d96c0e3a7ffa251754a94
parent862c4ccf91d2cfc48d1ce2f38b194885eccb3069 (diff)
downloadawlsim-44a3f0fba02013f2feea81ae9739f2e201cb3db8.tar.xz
awlsim-44a3f0fba02013f2feea81ae9739f2e201cb3db8.zip
Fix crash by incorrect access to s5t_to_seconds()
Signed-off-by: Michael Buesch <m@bues.ch>
-rw-r--r--awlsim/core/operators.py2
-rw-r--r--awlsim/gui/cpustate.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/awlsim/core/operators.py b/awlsim/core/operators.py
index 0cefc725..578d33a8 100644
--- a/awlsim/core/operators.py
+++ b/awlsim/core/operators.py
@@ -329,7 +329,7 @@ class AwlOperator(object): #+cdef
if self.operType == AwlOperatorTypes.IMM_REAL:
return str(dwordToPyFloat(self.immediate))
elif self.operType == AwlOperatorTypes.IMM_S5T:
- seconds = Timer.s5t_to_seconds(self.immediate)
+ seconds = Timer_s5t_to_seconds(self.immediate)
return "S5T#" + AwlDataType.formatTime(seconds)
elif self.operType == AwlOperatorTypes.IMM_TIME:
return "T#" + AwlDataType.formatTime(self.immediate / 1000.0)
diff --git a/awlsim/gui/cpustate.py b/awlsim/gui/cpustate.py
index a938bcc3..6e52c080 100644
--- a/awlsim/gui/cpustate.py
+++ b/awlsim/gui/cpustate.py
@@ -949,7 +949,7 @@ class State_Timer(_State_TimerCounter):
fmt = self.formatCombo.itemData(self.formatCombo.currentIndex())
if fmt == "s5t":
try:
- seconds = Timer.s5t_to_seconds(value)
+ seconds = Timer_s5t_to_seconds(value)
return "S5T#" + AwlDataType.formatTime(seconds, True)
except AwlSimError as e:
return ""
bues.ch cgit interface