diff options
author | ansimita <11040069+ansimita@users.noreply.github.com> | 2021-07-11 14:59:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-11 07:59:23 -0700 |
commit | e5b75d41db026f7fc9b62582a1c76549b59d6532 (patch) | |
tree | f4a1fd9682349f8d2767f90d5659a2497966a495 | |
parent | 22b538139606321bb1083665c510e81adb3d6670 (diff) | |
download | rneovim-e5b75d41db026f7fc9b62582a1c76549b59d6532.tar.gz rneovim-e5b75d41db026f7fc9b62582a1c76549b59d6532.tar.bz2 rneovim-e5b75d41db026f7fc9b62582a1c76549b59d6532.zip |
chore(clang): Fix 'Array subscript is undefined' #15057
-rw-r--r-- | src/nvim/hardcopy.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c index 164430b911..1b1735c991 100644 --- a/src/nvim/hardcopy.c +++ b/src/nvim/hardcopy.c @@ -2398,8 +2398,16 @@ static int prt_add_resource(struct prt_ps_resource_S *resource) EMSG2(_("E456: Can't open file \"%s\""), resource->filename); return FALSE; } - prt_dsc_resources("BeginResource", prt_resource_types[resource->type], - (char *)resource->title); + switch (resource->type) { + case PRT_RESOURCE_TYPE_PROCSET: + case PRT_RESOURCE_TYPE_ENCODING: + case PRT_RESOURCE_TYPE_CMAP: + prt_dsc_resources("BeginResource", prt_resource_types[resource->type], + (char *)resource->title); + break; + default: + return FALSE; + } prt_dsc_textline("BeginDocument", (char *)resource->filename); |