X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Finput%2Fvcd.c;h=b25c7381b7d32ab1830070c2c80fafc76ab03cab;hb=1f706c21a2977c768692f72d09b35633628d2b0d;hp=66f126b422ed8c0f1521b14d0dcf324813b34459;hpb=62974b235a5c5aeaacad5d28a50aef39f528dccd;p=libsigrok.git diff --git a/src/input/vcd.c b/src/input/vcd.c index 66f126b4..b25c7381 100644 --- a/src/input/vcd.c +++ b/src/input/vcd.c @@ -105,6 +105,10 @@ static gboolean parse_section(GString *buf, gchar **name, gchar **contents) status = FALSE; pos = 0; + /* Skip UTF8 BOM */ + if (buf->len >= 3 && !strncmp(buf->str, "\xef\xbb\xbf", 3)) + pos = 3; + /* Skip any initial white-space. */ while (pos < buf->len && g_ascii_isspace(buf->str[pos])) pos++;