17 lines
625 B
Plaintext
17 lines
625 B
Plaintext
$OpenBSD: patch-ccmain_pgedit_cpp,v 1.1 2009/03/05 08:09:40 ajacoutot Exp $
|
|
|
|
Fix crash -- cf. http://www.win.tue.nl/~aeb/linux/ocr/tesseract.html
|
|
|
|
--- ccmain/pgedit.cpp.orig Sat Feb 28 08:33:20 2009
|
|
+++ ccmain/pgedit.cpp Sat Feb 28 08:33:50 2009
|
|
@@ -752,6 +752,9 @@ void pgeditor_read_file( // of seria
|
|
|
|
// ptr to last dot
|
|
filename_extension = strrchr(name.string(), '.');
|
|
+ if (filename_extension == NULL)
|
|
+ filename_extension = ""; // prevent segfaults
|
|
+
|
|
#ifdef __UNIX__
|
|
/* TEXTROW* tessrows;
|
|
TBLOB* tessblobs;
|