File: 06fix_-X_handling.patch

package info (click to toggle)
morse 2.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 520 kB
  • sloc: ansic: 2,764; xml: 385; makefile: 117
file content (20 lines) | stat: -rw-r--r-- 662 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: fix -X crash
Author: Kamal Mostafa <kamal@whence.com>
Bug-Debian: https://bugs.debian.org/716099
Bug-Debian: https://bugs.debian.org/716111
Bug-Debian: https://bugs.debian.org/716218
Bug-Debian: https://bugs.debian.org/716298

The -X switch references optarg so needs ":" in the getopt() string.

--- a/morse.d/morse.c
+++ b/morse.d/morse.c
@@ -323,7 +323,7 @@
 
 	/* DGHJKLMOPQUVWYZhjkouyz are still available */
 	while ((ch = getopt(argc, argv,
-	                    "ABC:E:F:IM:N:R:STXabcdef:g:ilmn:p:qrstv:w:x:")) !=
+	                    "ABC:E:F:IM:N:R:STX:abcdef:g:ilmn:p:qrstv:w:x:")) !=
 	       EOF) {
 		switch ((char)ch) {
 		case 'A':