This commit is contained in:
iceman1001 2019-03-19 00:12:46 +01:00
parent e3dbbd3271
commit f79c0075c4
2 changed files with 3 additions and 3 deletions

View file

@ -113,8 +113,8 @@ char *mtostr(const model_t *model) {
+ strlen(strbuf) + strlen(strbuf)
+ (polystr && *polystr ? strlen(polystr) : 6) + (polystr && *polystr ? strlen(polystr) : 6)
+ (initstr && *initstr ? strlen(initstr) : 6) + (initstr && *initstr ? strlen(initstr) : 6)
+ (model->flags & P_REFIN ? 4 : 5) + ((model->flags & P_REFIN) ? 4 : 5)
+ (model->flags & P_REFOUT ? 4 : 5) + ((model->flags & P_REFOUT) ? 4 : 5)
+ (xorotstr && *xorotstr ? strlen(xorotstr) : 6) + (xorotstr && *xorotstr ? strlen(xorotstr) : 6)
+ (checkstr && *checkstr ? strlen(checkstr) : 6) + (checkstr && *checkstr ? strlen(checkstr) : 6)
+ (magicstr && *magicstr ? strlen(magicstr) : 6) + (magicstr && *magicstr ? strlen(magicstr) : 6)

View file

@ -1207,7 +1207,7 @@ prhex(char **spp, bmp_t bits, int flags, int bperhx) {
* Set P_UPPER in flags to write A-F in uppercase. * Set P_UPPER in flags to write A-F in uppercase.
*/ */
static const char hex[] = "0123456789abcdef0123456789ABCDEF"; static const char hex[] = "0123456789abcdef0123456789ABCDEF";
const int upper = (flags & P_UPPER ? 0x10 : 0); const int upper = ((flags & P_UPPER) ? 0x10 : 0);
while (bperhx > 0) { while (bperhx > 0) {
bperhx -= ((bperhx + 3) & 3) + 1; bperhx -= ((bperhx + 3) & 3) + 1;
*(*spp)++ = hex[(bits >> bperhx & BMP_C(0xf)) | upper]; *(*spp)++ = hex[(bits >> bperhx & BMP_C(0xf)) | upper];