Do not eat last char of data type, using .+ in regular expression. Fixes issue #1260.

This commit is contained in:
Ansgar Becker
2009-07-27 20:10:05 +00:00
parent 7a91fa36f6
commit c15654aacb

View File

@ -299,7 +299,7 @@ begin
listColumns.BeginUpdate;
rx.ModifierS := False;
rx.Expression := '\s+`([^`]+)`\s(\w+)(.+)';
rx.Expression := '\s+`([^`]+)`\s(\w+)(.*)';
rxCol := TRegExpr.Create;
rxCol.ModifierI := True;
if rx.Exec(CreateTable) then while true do begin
@ -310,7 +310,7 @@ begin
ColSpec := rx.Match[3];
// Strip trailing comma
if ColSpec[Length(ColSpec)] = ',' then
if (ColSpec <> '') and (ColSpec[Length(ColSpec)] = ',') then
Delete(ColSpec, Length(ColSpec), 1);
// Datatype