mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-18 02:06:43 +00:00
Fixes #112
This commit is contained in:
parent
cde03af8af
commit
cfb02869bb
@ -54,7 +54,7 @@ public class Assembler {
|
||||
*/
|
||||
private static String removeLabel(String line) {
|
||||
|
||||
return line.replaceAll("\\b\\w*\\b:", "");
|
||||
return line.replaceAll("^\\s*\\b\\w*\\b:", "");
|
||||
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ public class Assembler {
|
||||
line = removeComment(line);
|
||||
|
||||
//Check for labels
|
||||
Pattern pattern = Pattern.compile("\\b\\w*\\b:");
|
||||
Pattern pattern = Pattern.compile("^\\s*\\b\\w*\\b:");
|
||||
Matcher matcher = pattern.matcher(line);
|
||||
|
||||
if (matcher.find()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user