| 407 | |
| 408 | if (GEngine->GetTextWidth(_size, _font, buffer) > _w) |
| 409 | { |
| 410 | const char* p = buffer; |
| 411 | const char* word = nullptr; |
| 412 | float width = 0; |
| 413 | while (*p != 0) |
| 414 | { |
| 415 | const char* q = p; |
| 416 | char c = *p++; |
| 417 | if ((unsigned char)c <= 32) |
| 418 | { |
| 419 | word = p; |
| 420 | } |
| 421 | char temp[8]; |
| 422 | p = buffer + CopyTextElement(buffer, static_cast<int>(q - (const char*)buffer), _font->GetLangID(), |
| 423 | temp, sizeof(temp)); |
| 424 | width += GEngine->GetTextWidth(_size, _font, temp); |
| 425 | if (width > _w) |
| 426 | { |
| 427 | if (word) |
no test coverage detected