File: 0002-Format-error-string.patch

package info (click to toggle)
ruby-ncurses 1.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 704 kB
  • sloc: ansic: 4,839; ruby: 1,005; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 609 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: Per Andersson <avtobiff@gmail.com>
Date: Thu, 7 Jun 2012 19:04:54 +0200
Subject: Format error string.

---
 form_wrap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/form_wrap.c b/form_wrap.c
index c1a9e47..ad35047 100644
--- a/form_wrap.c
+++ b/form_wrap.c
@@ -1132,7 +1132,7 @@ static void* make_arg(va_list* ap) {
 		  char msg[500];
 		  snprintf(msg, 500, "The validation functions for this field type need %d additional arguments.",(int)(NUM2INT(argc)-1));
 		  msg[499]=0;
-		  rb_raise(rb_eArgError, msg);	
+		  rb_raise(rb_eArgError, "%s", msg);
 		}
 	 } 
   }
--