1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-14 07:43:06 +00:00

Fix a regression appending newline to commments

Reported by:	avilla
This commit is contained in:
Baptiste Daroussin 2012-07-30 08:25:34 +00:00
parent bb5177b4fb
commit 80a49985ce
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=301711
2 changed files with 13 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= pkg
DISTVERSION= 1.0-rc5
PORTREVISION= 1
CATEGORIES= ports-mgmt
MASTER_SITES= LOCAL/portmgr \
http://files.etoilebsd.net/pkg/

View File

@ -0,0 +1,12 @@
--- ./libpkg/pkg_manifest.c.orig 2012-07-30 01:08:44.000000000 +0200
+++ ./libpkg/pkg_manifest.c 2012-07-30 10:23:20.768918130 +0200
@@ -189,8 +189,7 @@
{
int ret = EPKG_OK;
- while (val->data.scalar.length > 1 &&
- val->data.scalar.value[val->data.scalar.length - 2] == '\n' &&
+ while (val->data.scalar.length > 0 &&
val->data.scalar.value[val->data.scalar.length - 1] == '\n') {
val->data.scalar.value[val->data.scalar.length - 1] = '\0';
val->data.scalar.length--;