changeset 12081:c781fb52c1d7 release-3-2-x

fix current class method determination
author Jaroslav Hajek <highegg@gmail.com>
date Tue, 01 Sep 2009 09:35:17 +0200
parents 16a1e60b4701
children 92b5580c0145
files src/ChangeLog src/ov-class.cc
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Sep 01 09:32:38 2009 +0200
+++ b/src/ChangeLog	Tue Sep 01 09:35:17 2009 +0200
@@ -1,3 +1,7 @@
+2009-09-01  Jaroslav Hajek  <highegg@gmail.com>
+
+	* ov-class.cc (get_current_method_class): Check before slicing.
+
 2009-08-26  Jaroslav Hajek  <highegg@gmail.com>
 
 	* data.cc (Ffmod): Reverse order of args.
--- a/src/ov-class.cc	Tue Sep 01 09:32:38 2009 +0200
+++ b/src/ov-class.cc	Tue Sep 01 09:35:17 2009 +0200
@@ -105,7 +105,8 @@
 
   std::string method_class = file_ops::tail (my_dir);
 
-  retval = method_class.substr (1);
+  if (method_class.size () > 0)
+    retval = method_class.substr (1);
 
   return retval;
 }