Skip to content

Bug in main.asm when we enter a large string then run the program again with a smaller size string the encryption output is wrong #42

@MostafaAE

Description

@MostafaAE

BUG in main.asm

main.asm have a bug: When we enter a large string then run the program again with a smaller size string the encryption outputs a string of size equals to the largest string entered filled with garbage values.

Failed test cases:

Enter a string: qqqqqqqq
Enter 4 keys
Enter Key 1: 0
Enter Key 2: 0
Enter Key 3: 0
Enter Key 4: 0

Program Output:
image
✔️

Enter a string: q
Enter 4 keys
Enter Key 1: 0
Enter Key 2: 0
Enter Key 3: 0
Enter Key 4: 0

Program Output:
image

-------------------------------------------------------------------------------------------------------------------------

Expected Output:
The Second output must be 1 character only not 8!

image
✔️

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions