You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PDF417.new(text: '').to_blob would segfault. A simple fix may be just rasing error on empty string. I also look at other 2d barcode. It seems that QR Code is able to encode empty string. Not sure how PDF417 should handle this corner case.
The text was updated successfully, but these errors were encountered:
Segfaulting tells me that it is something in the C module that is causing a problem. It would be nice I think to fix that, but I also don't see a solid case for needing an empty barcode. An easier fix would be to peek into the the Ruby wrapper and just not invoke the PDF417::Lib portion if the text to be encoded is empty.
It may be a while before I get to fixing that, is it something you'd be interested in submitting as an MR? Maybe just raise an exception with a helpful error in PDF417#generate?
So in trying to test #8 I was able to reproduce this on 2.1.9p490 and I think I've got a fix in master now. If you don't mind, could you please pull and re-test? I've tested with ruby 2.1.9p490 and ruby 2.2.5p319
If it looks like it's working for you now I'll push a release.
PDF417.new(text: '').to_blob
would segfault. A simple fix may be just rasing error on empty string. I also look at other 2d barcode. It seems that QR Code is able to encode empty string. Not sure how PDF417 should handle this corner case.The text was updated successfully, but these errors were encountered: