Commit 9329e625 authored by Sebastian Sauer's avatar Sebastian Sauer
Browse files

safer.

svn path=/trunk/koffice/; revision=599900
parent e251ef87
......@@ -197,6 +197,8 @@ namespace Kross {
switch( TYPE(value) ) {
case T_STRING: {
long length = LONG2NUM( RSTRING(value)->len );
if( length < 0 )
return QByteArray("");
char* ca = rb_str2cstr(value, &length);
return QByteArray(ca, length);
} break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment