mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-27 03:02:49 +01:00
internal/shaderir: trim space before calc hash
This commit is contained in:
parent
7d3007a43e
commit
a5c221451a
@ -16,6 +16,7 @@
|
||||
package shaderir
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/hex"
|
||||
"go/constant"
|
||||
"go/token"
|
||||
@ -35,7 +36,7 @@ type SourceHash [16]byte
|
||||
|
||||
func CalcSourceHash(source []byte) SourceHash {
|
||||
h := fnv.New128a()
|
||||
_, _ = h.Write(source)
|
||||
_, _ = h.Write(bytes.TrimSpace(source))
|
||||
|
||||
var hash SourceHash
|
||||
h.Sum(hash[:0])
|
||||
|
Loading…
Reference in New Issue
Block a user