diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2020-02-06 09:19:24 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2020-02-06 09:19:24 +0000 |
commit | 573db774ae37e832d2146e2db48a085be89a4c1b (patch) | |
tree | 1901d4826ffcd6ae0b6d62c86fef7af487eb883f /Build/source/texk/dvipdfm-x/pdfobj.c | |
parent | 0d82fd6d67f9a1cf5e2af3873aec855effb4913c (diff) |
remove unnecessary assert() check (from S. Hirata)
git-svn-id: svn://tug.org/texlive/trunk@53690 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdfobj.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfobj.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdfobj.c b/Build/source/texk/dvipdfm-x/pdfobj.c index 50246fc7ede..fc977d2a06f 100644 --- a/Build/source/texk/dvipdfm-x/pdfobj.c +++ b/Build/source/texk/dvipdfm-x/pdfobj.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2019 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2020 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu> @@ -938,20 +938,20 @@ pdf_new_string (const void *str, unsigned length) pdf_obj *result; pdf_string *data; - ASSERT(str); - result = pdf_new_obj(PDF_STRING); data = NEW(1, pdf_string); result->data = data; data->length = length; - if (length) { + if (str && length > 0) { data->string = NEW(length+1, unsigned char); memcpy(data->string, str, length); /* Shouldn't assume NULL terminated. */ data->string[length] = '\0'; - } else + } else { data->string = NULL; + data->length = 0; + } return result; } |