Skip to content

Commit 3c18de8

Browse files
committed
* Bug Fix: Encrypted files in Windows could not be decrypted in Linux
and vice versa. Merge branch 'develop'
2 parents d783f96 + c4e55d8 commit 3c18de8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

headers/stdint.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/* stdint */
1212
#ifdef __WINDOWS
1313
// https://docs.microsoft.com/en-us/cpp/cpp/data-type-ranges?view=vs-2019
14-
typedef __int32 uint32_t;
14+
typedef unsigned __int32 uint32_t;
1515
#else
1616
#include <stdint.h> // For standard int types
1717
#endif

tea.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ bool encrypt_decrypt(int mode, char *key, int flags,
9999
code ((uint32_t *) d, (uint32_t *) key);
100100
else
101101
decode ((uint32_t *) d, (uint32_t *) key);
102+
103+
/*printf("\nkey:%u %u %u %u data:%u %u\n",
104+
key[0],key[1],key[2],key[3],d[0],d[1]);*/
102105

103106
// Write back
104107
if ((len = write (outf,d,DATA_SIZE)) < 0){

0 commit comments

Comments
 (0)