Skip to content

Commit 560849c

Browse files
committed
Test fixes
1 parent b7ca919 commit 560849c

File tree

5 files changed

+217
-204
lines changed

5 files changed

+217
-204
lines changed

lib/interface/streamhook.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,8 @@ JPG_LONG OStreamHook(struct JPG_Hook *hook, struct JPG_TagItem *tags)
325325
// DICOM should always be integer input
326326
// Need to byte swap if on a big endian system
327327
#ifdef JPG_BIG_ENDIAN
328-
ULONG count = width * height * omm->omm_usDepth;
329328
if (omm->omm_ucPixelType == CTYP_UWORD) {
330-
// ULONG count = width * height * omm->omm_usDepth;
329+
ULONG count = width * height * omm->omm_usDepth;
331330
UWORD *data = (UWORD *)omm->omm_pMemPtr;
332331

333332
do {
@@ -339,10 +338,10 @@ JPG_LONG OStreamHook(struct JPG_Hook *hook, struct JPG_TagItem *tags)
339338

340339
// Write the decoded data to the output
341340
// For each pixel
342-
ULONG count2 = width * height * omm->omm_usDepth;
341+
ULONG count = width * height * omm->omm_usDepth;
343342
ULONG size = omm->omm_ucPixelType & CTYP_SIZE_MASK;
344343
UBYTE *mem = (UBYTE *)(omm->omm_pMemPtr);
345-
for (ULONG ii = 1; ii <= count2; ii++) {
344+
for (ULONG ii = 1; ii <= count; ii++) {
346345
// For each byte of the pixel
347346
for (ULONG jj = 1; jj <= size; jj++) {
348347
if (out->position >= out->length) {

0 commit comments

Comments
 (0)