____________________________________________________________ Write an attribute starting with a null terminated string.
| 1707 | // Write an attribute starting with a null terminated string. |
| 1708 | // |
| 1709 | static void put_asciz( SCHAR attribute, const TEXT* str) |
| 1710 | { |
| 1711 | BurpGlobals* tdgbl = BurpGlobals::getSpecific(); |
| 1712 | |
| 1713 | USHORT l = strlen(str); |
| 1714 | if (l > MAX_UCHAR) |
| 1715 | { |
| 1716 | BURP_print(false, 343, SafeArg() << int(attribute) << "put_asciz()" << USHORT(MAX_UCHAR)); |
| 1717 | // msg 343: text for attribute @1 is too large in @2, truncating to @3 bytes |
| 1718 | l = MAX_UCHAR; |
| 1719 | } |
| 1720 | |
| 1721 | put(tdgbl, attribute); |
| 1722 | put(tdgbl, l); |
| 1723 | while (l--) |
| 1724 | put(tdgbl, *str++); |
| 1725 | } |
| 1726 | |
| 1727 | |
| 1728 | //____________________________________________________________ |
no test coverage detected