MCPcopy Create free account
hub / github.com/assaultcube/AC / say

Method say

source/src/console.cpp:628–647  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

626}
627
628bool textinputbuffer::say(const char *c)
629{
630 string txt;
631 copystring(txt, c);
632 filterunrenderables(txt);
633 int buflen = (int)strlen(buf), txtlen = (int)strlen(txt);
634 if(txtlen && buflen < maxlen() && buflen + txtlen < (int)sizeof(buf))
635 {
636 if(pos < 0) memcpy(buf + buflen, txt, txtlen);
637 else
638 {
639 memmove(&buf[pos + txtlen], &buf[pos], buflen - pos);
640 memcpy(&buf[pos], txt, txtlen);
641 pos += txtlen;
642 }
643 buf[buflen + txtlen] = '\0';
644 return true;
645 }
646 return false;
647}
648
649void textinputbuffer::pasteclipboard()
650{

Callers 1

processtextinputFunction · 0.45

Calls 2

copystringFunction · 0.85
filterunrenderablesFunction · 0.85

Tested by

no test coverage detected