Fossil SCM
Resolved display cookie diff setting inconsistency reported in [forum:/forumpost/f7e18f946b | forum post f7e18f946b].
Commit
e378f9300e9da364546556107f4c2ad13944d165492c82e6384bd2302bc094a4
Parent
999e33cc7a55116…
1 file changed
+2
-1
+2
-1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1662,11 +1662,12 @@ | ||
| 1662 | 1662 | ** * The "preferred-diff-type" setting |
| 1663 | 1663 | ** * 1 for mobile and 2 for desktop, based on the UserAgent |
| 1664 | 1664 | */ |
| 1665 | 1665 | int preferred_diff_type(void){ |
| 1666 | 1666 | int dflt; |
| 1667 | - char zDflt[2]; | |
| 1667 | + static char zDflt[2] | |
| 1668 | + /*static b/c cookie_link_parameter() does not copy it!*/; | |
| 1668 | 1669 | dflt = db_get_int("preferred-diff-type",-99); |
| 1669 | 1670 | if( dflt<=0 ) dflt = user_agent_is_likely_mobile() ? 1 : 2; |
| 1670 | 1671 | zDflt[0] = dflt + '0'; |
| 1671 | 1672 | zDflt[1] = 0; |
| 1672 | 1673 | cookie_link_parameter("diff","diff", zDflt); |
| 1673 | 1674 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1662,11 +1662,12 @@ | |
| 1662 | ** * The "preferred-diff-type" setting |
| 1663 | ** * 1 for mobile and 2 for desktop, based on the UserAgent |
| 1664 | */ |
| 1665 | int preferred_diff_type(void){ |
| 1666 | int dflt; |
| 1667 | char zDflt[2]; |
| 1668 | dflt = db_get_int("preferred-diff-type",-99); |
| 1669 | if( dflt<=0 ) dflt = user_agent_is_likely_mobile() ? 1 : 2; |
| 1670 | zDflt[0] = dflt + '0'; |
| 1671 | zDflt[1] = 0; |
| 1672 | cookie_link_parameter("diff","diff", zDflt); |
| 1673 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1662,11 +1662,12 @@ | |
| 1662 | ** * The "preferred-diff-type" setting |
| 1663 | ** * 1 for mobile and 2 for desktop, based on the UserAgent |
| 1664 | */ |
| 1665 | int preferred_diff_type(void){ |
| 1666 | int dflt; |
| 1667 | static char zDflt[2] |
| 1668 | /*static b/c cookie_link_parameter() does not copy it!*/; |
| 1669 | dflt = db_get_int("preferred-diff-type",-99); |
| 1670 | if( dflt<=0 ) dflt = user_agent_is_likely_mobile() ? 1 : 2; |
| 1671 | zDflt[0] = dflt + '0'; |
| 1672 | zDflt[1] = 0; |
| 1673 | cookie_link_parameter("diff","diff", zDflt); |
| 1674 |