Skip to content

Commit

Permalink
Issue 5482 - Crash with align(0)
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Mar 1, 2011
1 parent 19f4b17 commit 6f9f2cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parse.c
@@ -1,6 +1,6 @@

// Compiler implementation of the D programming language
// Copyright (c) 1999-2010 by Digital Mars
// Copyright (c) 1999-2011 by Digital Mars
// All Rights Reserved
// written by Walter Bright
// http://www.digitalmars.com
Expand Down Expand Up @@ -391,10 +391,10 @@ Array *Parser::parseDeclDefs(int once)
if (token.value == TOKlparen)
{
nextToken();
if (token.value == TOKint32v)
if (token.value == TOKint32v && token.uns64value > 0)
n = (unsigned)token.uns64value;
else
{ error("integer expected, not %s", token.toChars());
{ error("positive integer expected, not %s", token.toChars());
n = 1;
}
nextToken();
Expand Down

0 comments on commit 6f9f2cd

Please sign in to comment.