Skip to content

Commit

Permalink
Use relative path for generated mem init file.
Browse files Browse the repository at this point in the history
Signed-off-by: yqszxx <[email protected]>
  • Loading branch information
yqszxx committed Feb 10, 2020
1 parent 63e0493 commit 606c5b7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mem/mem.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@ func (mem Memory) String() string {
for _, k := range keys {
d = fmt.Sprintf("%s%02X\n", d, uint8((mem.data[k].value)>>(8*i)&0xFF))
}
file := fmt.Sprintf("/tmp/yarc_%d.txt", i)
_ = ioutil.WriteFile(file, []byte(d), 0644)
file := fmt.Sprintf("./build/yarc_%d.txt", i)
if err := ioutil.WriteFile(file, []byte(d), 0644); err != nil {
log.Println(err)
}
}

return s
Expand Down

0 comments on commit 606c5b7

Please sign in to comment.