Browse Source

Fix decryption bug

Bernd Gottschlag 5 years ago
parent
commit
05696f7e74
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      weather-sensor/firmware/encryption.c

+ 1
- 1
weather-sensor/firmware/encryption.c View File

65
 
65
 
66
 		/* Setup for next block */
66
 		/* Setup for next block */
67
 		currentCipherBlock = previousCipherBlock;
67
 		currentCipherBlock = previousCipherBlock;
68
-		if (previousCipherBlock != (uint8_t*) data)
68
+		if (previousCipherBlock != (uint8_t*) data + LENGTH_OF_BLOCK)
69
 		{
69
 		{
70
 			previousCipherBlock -= LENGTH_OF_BLOCK;
70
 			previousCipherBlock -= LENGTH_OF_BLOCK;
71
 		}
71
 		}

Loading…
Cancel
Save