Skip to content
This repository
Browse code

Correctly handle NULL pointers in make_str_result.

  • Loading branch information...
commit cdbd822840e260d7e4f1fab2186b312a0e22cd90 1 parent af021f4
Arne Skjærholt authored May 05, 2013

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  src/vm/parrot/ops/nqp_dyncall.ops
2  src/vm/parrot/ops/nqp_dyncall.ops
@@ -263,7 +263,7 @@ make_num_result(PARROT_INTERP, PMC *type, FLOATVAL value) {
263 263
 PMC *
264 264
 make_str_result(PARROT_INTERP, PMC *type, INTVAL ret_type, char *cstring) {
265 265
     PMC *result = type;
266  
-    if (result != NULL && !PMC_IS_NULL(type)) {
  266
+    if (cstring != NULL && !PMC_IS_NULL(type)) {
267 267
         STRING *value = STRINGNULL;
268 268
         switch (ret_type & DYNCALL_ARG_TYPE_MASK) {
269 269
             case DYNCALL_ARG_ASCIISTR:

0 notes on commit cdbd822

Please sign in to comment.
Something went wrong with that request. Please try again.