On Fri, Nov 06, 2015 at 08:01:59AM +1000, Peter Hutterer wrote:
> If we're printing a zero-length string, we end up printing " * " and that
> makes anything unhappy that doesn't handle trailing whitespaces.
> 
> Signed-off-by: Peter Hutterer <[email protected]>

Easy enough.

Reviewed-by: Bryce Harrington <[email protected]>
> ---
>  src/scanner.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/scanner.c b/src/scanner.c
> index f456aa5..7b0f482 100644
> --- a/src/scanner.c
> +++ b/src/scanner.c
> @@ -1141,8 +1141,9 @@ format_copyright(const char *copyright)
>               }
>  
>               if (copyright[i] == '\n' || copyright[i] == '\0') {
> -                     printf("%s %.*s\n",
> +                     printf("%s%s%.*s\n",
>                              i == 0 ? "/*" : " *",
> +                            (i - start) == 0 ? "" : " ",
>                              i - start, copyright + start);
>                       bol = 1;
>               }
> -- 
> 2.4.3
> 
> _______________________________________________
> wayland-devel mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to