You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
main.asm have a bug: When a char is encrypted to '\0', there is a problem happens when we copy teaOut to teaIn again for decryption because Str_copy copys characters till it finds a '\0' so the teaOut is not fully copied back to teaIn in this case.
Failed test case:
input: MACBETH. My dearest love, Duncan comes here tonight. LADY MACBETH. And when goes hence? MACBETH. Tomorrow, as he purposes. LADY MACBETH.
Enter Key 1: 7
Enter Key 2: 8
Enter Key 3: 9
Enter Key 4: 0
BUG in main.asm
main.asm have a bug: When a char is encrypted to '\0', there is a problem happens when we copy teaOut to teaIn again for decryption because Str_copy copys characters till it finds a '\0' so the teaOut is not fully copied back to teaIn in this case.
Failed test case:
input: MACBETH. My dearest love, Duncan comes here tonight. LADY MACBETH. And when goes hence? MACBETH. Tomorrow, as he purposes. LADY MACBETH.
Enter Key 1: 7
Enter Key 2: 8
Enter Key 3: 9
Enter Key 4: 0
-------------------------------------------------------------------------------------------------------------------------
Program Output:
Encrypted: ╤;╘ûط
Q▼s�<Rn╩n"ئnص²ظp├╕ٌّDû╨╗fo┴¤ئ├╖%"╪�►└3Q▼╧┬■Z ≡▼ⁿ╟�7ُئcS╙%╢/اْrف▐▄عu╔ô╜ë/╤;╘ûط~Q▼┼→¤ ?<eء:ص#كِs√(z5ًB╬
VV-H4J≡}g �.cصطyٌë�ê╤;╘ûط
Decrypted: MACBETH. My dearest love, Duncan comes here tonight. LADY MACBET∙↑┘'3îّTb↔️ ═┐Z)زx│«nlt«$→▀ْ5╥▒╩��♣️ ى┐PT
UPr▬إ%
«رt►ج▼1ع~دس≡#\VP╫ب£▀ْ5╥▒╩��
-------------------------------------------------------------------------------------------------------------------------
Expected Output:
Encrypted: ╤;╘ûط
Q▼s�<Rn╩n"ئnص²ظp├╕ٌّDû╨╗fo┴¤ئ├╖%"╪�►└3Q▼╧┬■Z ≡▼ⁿ╟�7ُئcS╙%╢/اْrف▐▄عu╔ô╜ë/╤;╘ûط~Q▼┼→¤ ?<eء:ص#كِs√(z5ًB╬
V V-H4J≡}g �.cصطyٌë�ê╤;╘ûط
Decrypted: MACBETH. My dearest love, Duncan comes here tonight. LADY MACBETH. And when goes hence? MACBETH. Tomorrow, as he purposes. LADY MACBETH.
The text was updated successfully, but these errors were encountered: