summarylogtreecommitdiffstats
path: root/cscore
diff options
context:
space:
mode:
authorZeno2017-07-27 00:40:46 +0800
committerZeno2017-07-27 00:40:46 +0800
commit318145382349eb3974968569d3a25e9e5139a756 (patch)
tree87dbaaf8c1417680e82a59ff3fa5600d79aaa113 /cscore
parent8e5bd1accf77adc4c51d6efb23c5007ed7f57c62 (diff)
downloadaur-318145382349eb3974968569d3a25e9e5139a756.tar.gz
fix the bug which can terminate the app when class-type is null
Diffstat (limited to 'cscore')
-rwxr-xr-xcscore2
1 files changed, 1 insertions, 1 deletions
diff --git a/cscore b/cscore
index 9bb37d5b4a31..9303e96e7292 100755
--- a/cscore
+++ b/cscore
@@ -110,7 +110,7 @@ class Score:
cur_total_grade = 0.0
for course in cur_tmp:
cur_credit += float(course[0])
- if course[1] != "":
+ if course[1].strip() != "":
cur_total_grade += float(course[0]) * float(course[1])
if(cur_credit == 0):
return