From a8c5a4f93f73f7d23336e6dbdea8b262a24535ff Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Thu, 14 Mar 2024 18:08:22 +0100 Subject: [PATCH] properly skip unknown languages in pgf_write_pgf --- src/runtime/c/pgf/writer.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/runtime/c/pgf/writer.cxx b/src/runtime/c/pgf/writer.cxx index b47dc9d35..3c210793f 100644 --- a/src/runtime/c/pgf/writer.cxx +++ b/src/runtime/c/pgf/writer.cxx @@ -455,7 +455,10 @@ void PgfWriter::write_pgf(ref pgf) size_t len = 0; PgfText** p = langs; while (*p) { - len++; p++; + if (namespace_lookup(pgf->concretes, *p) != 0) { + len++; + } + p++; } write_len(len); }