Home/Support/Support Forum/Bug in RWEB_GENERIC.LIB, function _web_b2s_enum_multi
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Bug in RWEB_GENERIC.LIB, function _web_b2s_enum_multi

0 votes
IMHO there is a small bug in the aforementioned _web_b2s_enum_multi function.

I'm using the RWEB_GENERIC.LIB library distributed with DC10.72

"b2s" is ok when web_size(wc) == 2
Code:
i16 = bin ? *(unsigned __far *)bin : 0; for (m16 = 1; m16; m16 <<= 1) if (i16 & m16) { for (p16 = meta->select.ptr16; p16->name; ++p16) if (p16->value == m16) break; if (p16->name) { if (subseq) *str++ = ','; else subseq = 1; _f_strcpy(str, p16->name); str += strlen(str); } }

... and should look almost the same for 32-bit integers. On the contrary, it looks like this (and gives random results):
Code:
for (m32 = 1; m32; m32 <<= 1) if (i32 & m32) { i32 = bin ? *(unsigned long __far *)bin : 0uL; for (p32 = meta->select.ptr32; p32->name; ++p32) if (p32->value == i32) break; if (p32->name) { if (subseq) *str++ = ','; else subseq = 1; _f_strcpy(str, p32->name); str += strlen(str); } }
asked Dec 5, 2013 in Rabbit by tito.brasolin New to the Community (4 points)

Please log in or register to answer this question.

1 Answer

0 votes
I would agree. Thanks for the feedback and the pull request on GitHub.
answered Jan 12, 2016 by TomCollins Veteran of the Digi Community (1,872 points)
...