mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-22 13:29:01 +00:00
cgo: fix line/column reporting in syntax error messages
This commit is contained in:
committed by
Ron Evans
parent
bf9dab36f7
commit
138add2b96
+1
-1
@@ -81,7 +81,7 @@ func (p *cgoPackage) parseFragment(fragment string, cflags []string, posFilename
|
||||
defer C.free(unsafe.Pointer(filenameC))
|
||||
|
||||
// fix up error locations
|
||||
fragment = fmt.Sprintf("# %d %#v\n", posLine+1, posFilename) + fragment
|
||||
fragment = fmt.Sprintf("# %d %#v\n", posLine, posFilename) + fragment
|
||||
|
||||
fragmentC := C.CString(fragment)
|
||||
defer C.free(unsafe.Pointer(fragmentC))
|
||||
|
||||
Reference in New Issue
Block a user