int16_t i16;
int32_t i32;
int64_t i64, ret = 0;
- printf("%02x\n", encoding);
if (encoding == ZIP_INT_8B) {
ret = ((char*)p)[0];
} else if (encoding == ZIP_INT_16B) {
return 0;
}
} else {
- /* Try to compare encoded values */
+ /* Try to compare encoded values. Don't compare encoding because
+ * different implementations may encoded integers differently. */
if (zipTryEncoding(sstr,slen,&sval,&sencoding)) {
- if (entry.encoding == sencoding) {
- zval = zipLoadInteger(p+entry.headersize,entry.encoding);
- return zval == sval;
- }
+ zval = zipLoadInteger(p+entry.headersize,entry.encoding);
+ return zval == sval;
}
}
return 0;