____________________________________________________________ Move a text attribute to a string and fill.
| 1462 | // Move a text attribute to a string and fill. |
| 1463 | // |
| 1464 | static int get_text(UCHAR* text, SSHORT length) |
| 1465 | { |
| 1466 | BurpGlobals* tdgbl = BurpGlobals::getSpecific(); |
| 1467 | |
| 1468 | ULONG len = get(tdgbl); |
| 1469 | length -= len; |
| 1470 | const ULONG len2 = len; |
| 1471 | |
| 1472 | if (length < 0) |
| 1473 | { |
| 1474 | BURP_error_redirect(0, 46); // msg 46 string truncated |
| 1475 | } |
| 1476 | |
| 1477 | if (len) |
| 1478 | { |
| 1479 | do { |
| 1480 | *text++ = get(tdgbl); |
| 1481 | } while (--len); |
| 1482 | } |
| 1483 | |
| 1484 | *text = 0; |
| 1485 | |
| 1486 | return len2; |
| 1487 | } |
| 1488 | |
| 1489 | |
| 1490 | //____________________________________________________________ |
no test coverage detected