Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target all keys with a math operator bug #64

Closed
jsolson opened this Issue Nov 12, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@jsolson
Copy link

commented Nov 12, 2016

MM 2.7.3. Using target all keys with a math operator assigns garbage on the last match. It does appear to work fine with simple assignment. Can't access the server to grab the previous version. It does happen with 2.7.0 though.

(I'm trying to do this: @node_stack*,*[1,,] *= #$factor$)

Addition:

MMADD
{
	field_a = 1
	
	field_b = 1
	field_b = 1
	
	field_c = 1
	field_c = 1
	field_c = 1
	field_c = 1
}

@MMADD
{
	@field_a,* += 2
	@field_b,* += 2
	@field_c,* += 2
}

Result:

	MMADD
	{
		field_a = 15

		field_b = 3
		field_b = 13

		field_c = 3
		field_c = 3
		field_c = 3
		field_c = 9
	}

Multiplication:

MMMULT
{
	field_a = 1
	
	field_b = 1
	field_b = 1
	
	field_c = 1
	field_c = 1
	field_c = 1
	field_c = 1
}

@MMMULT
{
	@field_a,* *= 2
	@field_b,* *= 2
	@field_c,* *= 2
}

Result:

	MMMULT
	{
		field_a = 128

		field_b = 2
		field_b = 64

		field_c = 2
		field_c = 2
		field_c = 2
		field_c = 16
	}

Assignment is ok:

MMASSIGN
{
	field_a = 1
	
	field_b = 1
	field_b = 1
	
	field_c = 1
	field_c = 1
	field_c = 1
	field_c = 1
}

@MMASSIGN
{
	@field_a,* = 2
	@field_b,* = 2
	@field_c,* = 2
}

Result:

	MMASSIGN
	{
		field_a = 2

		field_b = 2
		field_b = 2

		field_c = 2
		field_c = 2
		field_c = 2
		field_c = 2
	}

@sarbian sarbian closed this in 833e09b Nov 14, 2016

@sarbian

This comment has been minimized.

Copy link
Owner

commented Nov 14, 2016

Thanks for the report with a clean test case 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.