X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.0%2Fcinelerra%2Fdcraw.c;h=9543ae84f31162d1167c99bbeaad9c0c5672a9d6;hb=c0b71a7151437c681fe832d1e446924a49ab29aa;hp=0f46aba28791389a9b171402a6e2e02a93844ea4;hpb=2d99bb8ce591f05a31464b517d85dc2bc35b2abe;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.0/cinelerra/dcraw.c b/cinelerra-5.0/cinelerra/dcraw.c index 0f46aba2..9543ae84 100644 --- a/cinelerra-5.0/cinelerra/dcraw.c +++ b/cinelerra-5.0/cinelerra/dcraw.c @@ -24,6 +24,7 @@ */ #define DCRAW_VERSION "9.17" +#define LOCALTIME #ifndef _GNU_SOURCE #define _GNU_SOURCE @@ -2375,7 +2376,7 @@ void CLASS kodak_thumb_load_raw() void CLASS sony_decrypt (unsigned *data, int len, int start, int key) { - static unsigned pad[128], p; + static unsigned pad[128], p = 0; if (start) { for (p=0; p < 4; p++) @@ -2386,8 +2387,10 @@ void CLASS sony_decrypt (unsigned *data, int len, int start, int key) for (p=0; p < 127; p++) pad[p] = htonl(pad[p]); } - while (len--) - *data++ ^= pad[p++ & 127] = pad[(p+1) & 127] ^ pad[(p+65) & 127]; + while (len--) { + *data++ ^= pad[p & 127] = pad[(p+1) & 127] ^ pad[(p+65) & 127]; + p++; + } } void CLASS sony_load_raw()