]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix passing wrong variable to cupsGetOption in testcups 541/head
authorRose <83477269+AtariDreams@users.noreply.github.com>
Thu, 17 Nov 2022 15:47:14 +0000 (10:47 -0500)
committerRose <83477269+AtariDreams@users.noreply.github.com>
Fri, 2 Dec 2022 13:50:03 +0000 (08:50 -0500)
dest is a pointer to a struct, not the array, which is dests.

Honestly, I have no idea how this even compiled in the first place. Yes I know this is testcups, but still.

cups/testcups.c

index 53b4ffe2bd3bb1f05d3cfa4d541ceff1e11c1211..e8271f8dd1edd474edab8a3013d1b3f92058da44 100644 (file)
@@ -377,7 +377,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
   for (i = 0, dest_name = NULL; i < num_dests; i ++)
   {
-    if ((dval = cupsGetOption("printer-is-temporary", dests[i].num_options, dest[i].options)) != NULL && !strcmp(dval, "false"))
+    if ((dval = cupsGetOption("printer-is-temporary", dests[i].num_options, dests[i].options)) != NULL && !strcmp(dval, "false"))
     {
       dest_name = dests[i].name;
       break;