Merge pull request #7790 from JacobBarthelmeh/random

fix for casting with add
This commit is contained in:
David Garske 2024-07-25 09:13:23 -07:00 committed by GitHub
commit 42930b28f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -594,7 +594,7 @@ static WC_INLINE void array_add(byte* d, word32 dLen, const byte* s, word32 sLen
dIdx = (int)dLen - 1;
for (sIdx = (int)sLen - 1; sIdx >= 0; sIdx--) {
carry += (word16)(d[dIdx] + s[sIdx]);
carry += (word16)d[dIdx] + (word16)s[sIdx];
d[dIdx] = (byte)carry;
carry >>= 8;
dIdx--;