Skip to content
Snippets Groups Projects
Commit 4edae791 authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

Bugfix empty message.

parent 864fc3a2
No related branches found
No related tags found
No related merge requests found
......@@ -139,6 +139,7 @@ display_msg(struct msg *msg)
int log = default_log;
char *line = msg->text;
int num_l=0;
while (*line)
{
// The parser it destructive, but it does not do any harm, since we display each message only once.
......@@ -189,6 +190,7 @@ display_msg(struct msg *msg)
outline_width = atoi(val);
if (l)
{
num_l++;
l->fg_color = fg_color;
l->outline_color = outline_color;
l->outline_width = outline_width;
......@@ -198,6 +200,16 @@ display_msg(struct msg *msg)
line = nl;
}
if(!num_l)
{
struct osd_line *l = osd_add_line(osd,OSD_TYPE_TEXT);
l->u.text[0]=0;
l->fg_color = fg_color;
l->outline_color = outline_color;
l->outline_width = outline_width;
l->log = log;
}
if (msg->min_light > msg->max_light)
msg->min_light = msg->max_light;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment