|
@ -27,19 +27,19 @@ This patch may break things badly, just be aware and proceed with care! Thanks. |
|
|
pos = (status + shortcut[i]); |
|
|
pos = (status + shortcut[i]); |
|
|
if (pos < shortcut[i + 1] && status_lines[pos] != NULL) { |
|
|
if (pos < shortcut[i + 1] && status_lines[pos] != NULL) { |
|
|
- return pos;
|
|
|
- return pos;
|
|
|
+ if (shortcut[i] == LEVEL_400) {
|
|
|
|
|
|
+ if (pos != (1 + shortcut[i])) {
|
|
|
|
|
|
+ return (0 + shortcut[i]);
|
|
|
|
|
|
|
|
|
+ if (shortcut[i] == LEVEL_400) { /* If code class is 400 */
|
|
|
|
|
|
+ if (pos != (1 + shortcut[i])) { /* If code in 400 class is not 401, then */
|
|
|
|
|
|
+ return (0 + shortcut[i]); /* Return 400 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ else {
|
|
|
+ return pos;
|
|
|
|
|
|
|
|
|
+ return pos; /* Else return 401 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (shortcut[i] == LEVEL_500) {
|
|
|
|
|
|
+ return (shortcut[i - 1]);
|
|
|
|
|
|
|
|
|
+ else if (shortcut[i] == LEVEL_500) { /* If code class is 500 */
|
|
|
|
|
|
+ return (0 + shortcut[i - 1]); /* Return first value of previous code class 400 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ else {
|
|
|
+ return pos;
|
|
|
|
|
|
|
|
|
+ return pos; /* Return normal code */
|
|
|
+ }
|
|
|
+ }
|
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|