Backport of:

From da0ff58c041f7ee129c3c2c72fb14df1f1e4069a Mon Sep 17 00:00:00 2001
From: Michael R Sweet <msweet@msweet.org>
Date: Wed, 8 Apr 2026 16:43:25 -0400
Subject: [PATCH] Fix get_options regression (Issue #1532)

---
 scheduler/job.c |  4 ++--
 test/5.5-lp.sh  | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -4144,7 +4144,7 @@ get_options(cupsd_job_t *job,		/* I - Jo
 	  case IPP_TAG_CHARSET :
 	  case IPP_TAG_LANGUAGE :
 	  case IPP_TAG_URI :
-	      for (valptr = attr->values[i].string.text; *valptr;)
+	      for (valptr = attr->values[i].string.text; *valptr; valptr ++)
 	      {
 	       /*
 	        * Convert tabs and newlines to spaces, filter out control chars,
@@ -4159,7 +4159,7 @@ get_options(cupsd_job_t *job,		/* I - Jo
 	        {
 	          if (strchr("\\\'\"", *valptr))
 		    *optptr++ = '\\';
-		  *optptr++ = *valptr++;
+		  *optptr++ = *valptr;
 		}
 	      }
 
--- a/test/5.5-lp.sh
+++ b/test/5.5-lp.sh
@@ -71,8 +71,8 @@ echo ""
 
 echo "LP Flood Test ($1 times in parallel)"
 echo ""
-echo "    lp -d Test1 testfile.jpg"
-echo "    lp -d Test2 testfile.jpg"
+echo "    lp -d Test1 -t 'Flood Test N' testfile.jpg"
+echo "    lp -d Test2 -t 'Flood Test N' testfile.jpg"
 i=0
 pids=""
 while test $i -lt $1; do
@@ -82,9 +82,9 @@ while test $i -lt $1; do
 		j=`expr $j + 1`
 	done
 
-	$runcups $VALGRIND ../systemv/lp -d Test1 ../examples/testfile.jpg 2>&1 &
+	$runcups $VALGRIND ../systemv/lp -d Test1 -t "Flood Test $j" ../examples/testfile.jpg 2>&1 &
 	pids="$pids $!"
-	$runcups $VALGRIND ../systemv/lp -d Test2 ../examples/testfile.jpg 2>&1 &
+	$runcups $VALGRIND ../systemv/lp -d Test2 -t "Flood Test $j" ../examples/testfile.jpg 2>&1 &
 	pids="$pids $!"
 
 	i=`expr $i + 1`
