[Kde-bindings] KDE/kdebindings/ruby/qtruby

Richard Dale Richard_Dale at tipitina.demon.co.uk
Mon May 19 09:33:03 UTC 2008


SVN commit 809701 by rdale:

* The method selector cache function had an off by one error, which meant
  it assumed there was one more argument to a method than there actually
  was. This caused a crash. Why such a major problem hasn't caused any
  problems before is a mystery - it wasn't a result of the modular smoke
  changes.

CCMAIL: kde-bindings at kde.org


 M  +8 -0      ChangeLog  
 M  +2 -2      src/Qt.cpp  


--- trunk/KDE/kdebindings/ruby/qtruby/ChangeLog #809700:809701
@@ -1,3 +1,11 @@
+2008-05-19  Richard Dale  <richard.j.dale at gmail.com>
+
+	* The method selector cache function had an off by one error, which meant
+	  it assumed there was one more argument to a method than there actually
+	  was. This caused a crash. Why such a major problem hasn't caused any
+	  problems before is a mystery - it wasn't a result of the modular smoke
+	  changes.
+
 2008-05-16  Arno Rehn  <arno at arnorehn.de>
 
 	* Bring qtruby.cpp up to date with the branch-version.
--- trunk/KDE/kdebindings/ruby/qtruby/src/Qt.cpp #809700:809701
@@ -680,15 +680,15 @@
 	if (mcid == 0) {
 		mcid = new QByteArray();
 	}
+
 	*mcid = rb_class2name(klass);
 	*mcid += ';';
 	*mcid += methodName;
-	for(int i=3; i<argc ; i++)
+	for(int i=4; i<argc ; i++)
 	{
 		*mcid += ';';
 		*mcid += get_VALUEtype(argv[i]);
 	}
-	
 	Smoke::ModuleIndex *rcid = methcache.value(*mcid);
 #ifdef DEBUG
 	if (do_debug & qtdb_calls) qWarning("method_missing mcid: %s", (const char *) *mcid);



More information about the Kde-bindings mailing list