mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
fix: snapshot single-digit week is not shown with 0 padded
This commit is contained in:
@@ -117,7 +117,7 @@ data class Snapshot(var revision: Int) {
|
||||
private var bytes = byteArrayOf()
|
||||
|
||||
internal fun update() {
|
||||
string = "${year}w${week}${Char(0x61 + revision)}"
|
||||
string = "${year}w${week.toString().padStart(2,'0')}${Char(0x61 + revision)}"
|
||||
bytes = byteArrayOf(
|
||||
revision.and(4).shl(7).or(year.and(127)).toByte(),
|
||||
week.shl(2).or(revision.and(3)).toByte()
|
||||
|
||||
Reference in New Issue
Block a user