mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 10:44:47 +01:00
The source map lines are not zero based. Lines are one based. fix #6
This commit is contained in:
parent
47430b3bc0
commit
3ba7b44089
@ -188,7 +188,7 @@ public class SourceMapWriter {
|
||||
void appendLineMappings() throws IOException {
|
||||
out.append( '\"' );
|
||||
for( SourceMapping mapping : mappings ) {
|
||||
int generatedLine = 1; // ever 1 for WebAssembly
|
||||
int generatedLine = 0; // ever 1 for WebAssembly but line one is coded as zero
|
||||
int generatedColumn = mapping.getGeneratedColumn();
|
||||
|
||||
if( generatedLine > 0 && previousLine != generatedLine ) {
|
||||
|
@ -37,7 +37,7 @@ public class SourceMapping {
|
||||
*/
|
||||
public SourceMapping( int generatedColumn, int sourceLine, String sourceFileName ) {
|
||||
this.generatedColumn = generatedColumn;
|
||||
this.sourceLine = sourceLine;
|
||||
this.sourceLine = sourceLine - 1; // The first line is coded as zero
|
||||
this.sourceFileName = sourceFileName;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user