diff --git a/main.go b/main.go index fc4501b..0fccfef 100644 --- a/main.go +++ b/main.go @@ -220,8 +220,9 @@ func getSystemDPI() uint32 { } // dpiScale scales a base-96-DPI pixel value to the system DPI. +// Uses floating-point to avoid precision loss on non-standard DPI values. func dpiScale(px int, dpi uint32) uintptr { - return uintptr(px * int(dpi) / 96) + return uintptr(int(float64(px)*float64(dpi)/96.0 + 0.5)) } // ── Font helpers ───────────────────────────────────────────────────────────── @@ -898,6 +899,10 @@ func handleURI(rawURI string) error { if token == "" { return fmt.Errorf("토큰이 없습니다") } + // JWT는 점(.)으로 구분된 3파트 형식이어야 함 + if parts := strings.Split(token, "."); len(parts) != 3 { + return fmt.Errorf("유효하지 않은 토큰 형식입니다") + } gameDir, err := installDir() if err != nil {