fix 991a shame 2

This commit is contained in:
hb9tob 2023-04-13 21:22:51 +02:00
parent bed3cbebd6
commit 91eccac90c

View file

@ -836,7 +836,7 @@ void CWiresX::sendAllReply()
unsigned int n = curr.size() - m_start;
if (n > 20U) n = 20U;
::sprintf((char*)(data + 22U), "%03u%03u", n, total);
::sprintf((char*)(data + 22U), "%03u%03u", 20U, total);
data[28U] = 0x0DU;
@ -868,7 +868,16 @@ void CWiresX::sendAllReply()
unsigned int k = 1029U - offset;
for(unsigned int i = 0U; i < k; i++)
data[i + offset] = 0x20U;
{
if (i % 50U == 49 && i>0)
{
data[i + offset] = 0x0DU;
}
else
{
data[i + offset] = 0x20U;
}
}
offset += k;
@ -1035,7 +1044,7 @@ void CWiresX::sendCategoryReply()
if (n > 20U)
n = 20U;
::sprintf((char*)(data + 22U), "%03u%03u", n, n);
::sprintf((char*)(data + 22U), "%03u%03u", 20U, n);
data[28U] = 0x0DU;
@ -1067,7 +1076,16 @@ void CWiresX::sendCategoryReply()
unsigned int k = 1029U - offset;
for(unsigned int i = 0U; i < k; i++)
data[i + offset] = 0x20U;
{
if (i % 50U == 49 && i>0)
{
data[i + offset] = 0x0DU;
}
else
{
data[i + offset] = 0x20U;
}
}
offset += k;