mirror of
https://git.soft.fish/val/MicroCorruption.git
synced 2024-11-22 19:25: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:
|
while True:
|
||||||
try:
|
try:
|
||||||
line = input("> ")
|
line = input("> ")
|
||||||
if (line[0] == '~'):
|
if (len(line) and line[0] == '~'):
|
||||||
h = hash(bytes.fromhex(line[1:]));
|
h = hash(bytes.fromhex(line[1:]));
|
||||||
else:
|
else:
|
||||||
h = hash(line.encode())
|
h = hash(line.encode())
|
||||||
|
Loading…
Reference in New Issue
Block a user