mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-16 22:43:58 +03:00
browser.c: Don't require > 0 chars in logging
Sometimes JavaScript chooses to log an empty string. We should honour that by requiring msg be a valid empty string. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
c5c8a49276
commit
03624bcf7a
@ -3458,7 +3458,10 @@ nserror browser_window_console_log(struct browser_window *bw,
|
||||
struct browser_window *root = browser_window_get_root(bw);
|
||||
|
||||
assert(msg != NULL);
|
||||
assert(msglen > 0);
|
||||
/* We don't assert msglen > 0, if someone wants to log a real empty
|
||||
* string then we won't stop them. It does sometimes happen from
|
||||
* JavaScript for example.
|
||||
*/
|
||||
|
||||
/* bw is the target of the log, but root is where we log it */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user