Permalink
Browse files

fix argument passing ops w/o parens in signature

git-svn-id: https://svn.parrot.org/parrot/trunk@8963 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 3c7d43c commit d2478f62f400c812dbfd40868faa34d01d2247ac Leopold Toetsch committed Aug 14, 2005
Showing with 4 additions and 1 deletion.
  1. +4 −1 classes/fixedintegerarray.pmc
@@ -65,11 +65,14 @@ which is a string I<"(el0, el1, ...)">.
SELF = constant_pmc_new(INTERP, type);
else
SELF = pmc_new(INTERP, type);
- if ((l = string_length(INTERP, rep)) <= 2) /* "()" - no args */
+ l = string_length(INTERP, rep);
+ if (!l)
return SELF;
if (rep->encoding != Parrot_fixed_8_encoding_ptr)
real_exception(INTERP, NULL, E_ValueError,
"unhandled string encoding in constructor");
+ if (l <= 2 && ((char*)rep->strstart)[0] == '(') /* "()" - no args */
+ return SELF;
/* count commas */
p = rep->strstart;
for (i = l, n = 0; i; --i, ++p) {

0 comments on commit d2478f6

Please sign in to comment.