From d3a5e0192a283023903572ed016f939ced37c5e6 Mon Sep 17 00:00:00 2001 From: Jochen Schmitt Date: Mar 15 2006 16:28:28 +0000 Subject: Add fixcodegen patch, #184245 --- diff --git a/highlight-2.4-fixcodegen.patch b/highlight-2.4-fixcodegen.patch new file mode 100644 index 0000000..a1f5c05 --- /dev/null +++ b/highlight-2.4-fixcodegen.patch @@ -0,0 +1,16 @@ +diff -ur highlight-2.4.4.old/highlight/codegenerator.cpp highlight-2.4.4/highlight/codegenerator.cpp +--- highlight-2.4.4.old/highlight/codegenerator.cpp 2006-02-19 09:11:18.000000000 -0800 ++++ highlight-2.4.4/highlight/codegenerator.cpp 2006-02-19 09:11:18.000000000 -0800 +@@ -284,7 +284,11 @@ + + bool CodeGenerator::readNewLine(string &newLine){ + bool eof; +- terminatingChar=newLine[lineIndex-1]; ++ if (lineIndex > 0) { ++ terminatingChar=newLine[lineIndex-1]; ++ } else { ++ terminatingChar = '\0'; ++ } + if (formattingPossible && formattingEnabled) { + eof=!formatter->hasMoreLines(); + if (!eof) { diff --git a/highlight.spec b/highlight.spec index 4476c18..d11918c 100644 --- a/highlight.spec +++ b/highlight.spec @@ -1,7 +1,7 @@ Name: highlight Summary: Universal source code to formatted text converter Version: 2.4.4 -Release: 1%{?dist} +Release: 2%{?dist} Group: Development/Tools License: GPL @@ -10,6 +10,7 @@ URL: http://www.andre-simon.de/ Source0: http://www.andre-simon.de/zip/%{name}-%{version}.tar.gz Patch1: highlight-2.4-makefile.patch Patch2: highlight-2.4-rpmoptflags.patch +Patch3: highlight-2.4-fixcodegen.patch Buildroot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) @@ -25,6 +26,7 @@ It is easily possible to create new language definitions and colour themes. %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build make %{?_smp_mflags} LDFLAGS= @@ -49,6 +51,9 @@ rm -rf $RPM_BUILD_ROOT %doc ChangeLog AUTHORS README* COPYING TODO examples/ %changelog +* Wed Mar 15 2006 Jochen Schmitt 2.4.4-2 +- Add fixcodegen patch #184245 + * Sun Mar 12 2006 Jochen Schmitt 2.4.4-1 - New upstream release - Adapt rpmopt patch to new upstream release