Skip to content

Commit

Permalink
Fix controller length for phalcon#1275
Browse files Browse the repository at this point in the history
(cherry picked from commit a6d8d5903876a6fb9e15bb1cce25a0e5ca442777)

Conflicts:
	ext/mvc/dispatcher.c
  • Loading branch information
sjinks committed Oct 19, 2013
1 parent 9eaa882 commit af6c30b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ext/mvc/dispatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@ PHP_METHOD(Phalcon_Mvc_Dispatcher, getControllerName){
char *c = Z_STRVAL_P(return_value);
int len = Z_STRLEN_P(return_value);
memmove(c, c+1, len-1);
c[len] = 0;
c[len-1] = 0;
c = erealloc(c, len);
if (likely(c != NULL)) {
RETVAL_STRINGL(c, len-1, 0);
}
}
}

Expand Down

0 comments on commit af6c30b

Please sign in to comment.