]> granicus.if.org Git - php/commitdiff
- Hopefully fix the debug_backtrace() code.
authorAndi Gutmans <andi@php.net>
Wed, 7 Apr 2004 15:29:09 +0000 (15:29 +0000)
committerAndi Gutmans <andi@php.net>
Wed, 7 Apr 2004 15:29:09 +0000 (15:29 +0000)
Zend/zend_builtin_functions.c

index 69963f2cc7772f55a64fd615c0636417e3f68f04..67ad7038ed5352790e42ddb5bdcb346113175b1d 100644 (file)
@@ -1437,7 +1437,7 @@ ZEND_FUNCTION(debug_print_backtrace)
        char *call_type;
        char *include_filename = NULL;
        zval *arg_array = NULL;
-       void **cur_arg_pos = EG(argument_stack).top_element-1;
+       void **cur_arg_pos = EG(argument_stack).top_element;
        void **args = cur_arg_pos;
        int arg_stack_consistent = 0;
        int frames_on_stack = 0;
@@ -1447,7 +1447,7 @@ ZEND_FUNCTION(debug_print_backtrace)
                ZEND_WRONG_PARAM_COUNT();
        }
 
-       while (--args >= EG(argument_stack).elements) {
+       while (--args > EG(argument_stack).elements) {
                if (*args--) {
                        break;
                }
@@ -1562,12 +1562,12 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last TSRML
        char *call_type;
        char *include_filename = NULL;
        zval *stack_frame;
-       void **cur_arg_pos = EG(argument_stack).top_element-1;
+       void **cur_arg_pos = EG(argument_stack).top_element;
        void **args = cur_arg_pos;
        int arg_stack_consistent = 0;
        int frames_on_stack = 0;
 
-       while (--args >= EG(argument_stack).elements) {
+       while (--args > EG(argument_stack).elements) {
                if (*args--) {
                        break;
                }