mirror of
https://git.soft.fish/val/MicroCorruption.git
synced 2024-11-22 13:55:58 +00:00
Check the length of the line before indexing
This commit is contained in:
parent
95162fdb72
commit
717a645d9d
@ -13,7 +13,7 @@ def hash(byts):
|
||||
while True:
|
||||
try:
|
||||
line = input("> ")
|
||||
if (line[0] == '~'):
|
||||
if (len(line) and line[0] == '~'):
|
||||
h = hash(bytes.fromhex(line[1:]));
|
||||
else:
|
||||
h = hash(line.encode())
|
||||
|
Loading…
Reference in New Issue
Block a user