Skip to content

Commit 4e67264

Browse files
committed
[mod_dirlisting] fix JS date sorting (fixes #3279)
(thx xu.k) x-ref: mod_dirlisting: JS code for mtime parsing is encoding 12 months within only 3 bits https://redmine.lighttpd.net/issues/3279
1 parent 230a4f5 commit 4e67264

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mod_dirlisting.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ static const char js_simple_table_resort[] = \
756756
" el.dataset.value = -1;\n" \
757757
" } else {\n" \
758758
" var d = li_date_regex.exec(get_inner_text(el));\n" \
759-
" el.dataset.value = (parseInt(d[1])*(1<<25))\n" \
759+
" el.dataset.value = (parseInt(d[1])*(1<<26))\n" \
760760
" + ( (li_mon_num(d[2])<<22)\n" \
761761
" |(parseInt(d[3]) <<17)\n" \
762762
" |(parseInt(d[4]) <<12)\n" \

0 commit comments

Comments
 (0)