Commit 4c174d5889ea9a0c455a25e04c5ab7f7f061a574
1 parent
2239286d
Exists in
master
and in
68 other branches
FIX: using float instead of eval because number leading with 00 is recognized as…
… octal and can raise a exception when have a 8 in the number
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
invesalius/reader/dicom.py
| @@ -225,7 +225,7 @@ class Parser(): | @@ -225,7 +225,7 @@ class Parser(): | ||
| 225 | # If multiple values are present for the "Window Center" | 225 | # If multiple values are present for the "Window Center" |
| 226 | # we choose only one. As this should be paired to "Window | 226 | # we choose only one. As this should be paired to "Window |
| 227 | # Width", it is set based on WL_PRESET | 227 | # Width", it is set based on WL_PRESET |
| 228 | - value_list = [eval(value) for value in data.split('\')] | 228 | + value_list = [float(value) for value in data.split('\')] |
| 229 | if multiple: | 229 | if multiple: |
| 230 | return value_list | 230 | return value_list |
| 231 | else: | 231 | else: |