MCPcopy Create free account
hub / github.com/dillo-browser/dillo / Html_input_get_size

Function Html_input_get_size

src/form.cc:413–427  ·  view source on GitHub ↗

* get size, restrict it to reasonable value */

Source from the content-addressed store, hash-verified

411 * get size, restrict it to reasonable value
412 */
413static int Html_input_get_size(DilloHtml *html, const char *attrbuf)
414{
415 const int MAX_SIZE = 1024;
416 int size = 20;
417
418 if (attrbuf) {
419 size = strtol(attrbuf, NULL, 10);
420 if (size < 1 || size > MAX_SIZE) {
421 int badSize = size;
422 size = (size < 1 ? 20 : MAX_SIZE);
423 BUG_MSG("<input> size=%d, using size=%d instead.", badSize, size);
424 }
425 }
426 return size;
427}
428
429/**
430 * Add a new input to current form

Callers 1

Html_tag_open_inputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected