Nov. 10, 2025
2:55 p.m.
Esme Povirk (@madewokherd) commented about dlls/sane.ds/capability.c:
case MSG_SET: twCC = msg_set(pCapability, &val); - if (twCC == TWCC_SUCCESS) - FIXME("Partial Stub: XFERCOUNT set to %ld, but ignored\n", val); + if (val==0) + { + // This case is explicitly mentioned in the TWAIN specification + activeDS.capXferCount = -1; + twCC = TWCC_CHECKSTATUS; + } + else if ((val>0 && val < 32768) || val==(TW_INT32) -1)
This cast doesn't make sense to me. If val is a TW_UINT32, it'll never compare equal to -1. I think maybe you want to cast to (TW_UINT32)? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9397#note_121410