#9 if/ruby/hpdf.c hpdf_set_info_date_attr ind

open
nobody
None
5
2007-04-15
2007-04-15
Anonymous
No

error message:
`HPDFDoc#set_info_date_attr': The eighth argument must be either of '+','-','Z',' '. (HPDFError)

patch:
--- hpdf.c.org 2006-11-23 13:19:32.000000000 +0900
+++ hpdf.c 2007-04-15 15:52:01.000000000 +0900
@@ -1388,7 +1388,7 @@

Data_Get_Struct(obj, HPDF_Doc_Rec, pdf);
s = STR2CSTR(ind);
- if (HPDF_StrLen(s, -1) != 1 || s[0] != '+' || s[0] != '-' || s[0] != 'Z')
+ if (HPDF_StrLen(s, -1) != 1 || (s[0] != '+' && s[0] != '-' && s[0] != 'Z' && s[0] != ' '))
rb_raise(rb_eHPDFError, "The eighth argument must be either of '+','-','Z',' '.");

tp = NUM2INT(type);

Discussion


Log in to post a comment.