caca: don't leave X coord uninitialized with unknown font alignment

This commit is contained in:
Brad Parker 2017-01-22 13:51:10 -05:00
parent b9eb1c0222
commit 5c77937dad

View File

@ -112,16 +112,15 @@ static void caca_render_msg(video_frame_info_t *video_info,
switch (align)
{
case TEXT_ALIGN_LEFT:
newX = x * width * scale;
break;
case TEXT_ALIGN_RIGHT:
newX = (x * width * scale) - strlen(msg);
break;
case TEXT_ALIGN_CENTER:
newX = (x * width * scale) - (strlen(msg) / 2);
break;
case TEXT_ALIGN_LEFT:
default:
newX = x * width * scale;
break;
}