Changeset 453 in dev for trunk


Ignore:
Timestamp:
Mar 22, 2008, 9:39:09 PM (16 years ago)
Author:
dai_9181
Message:

"Dim a = 0 As *Char" など、Charポインタ型変数の初期値にリテラル数値を指定すると強制終了してしまうバグを修正。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler32/Compile_Var.cpp

    r436 r453  
    865865    }
    866866    else if( type.IsLong() || type.IsDWord() || type.IsPointer() ){
    867         if(type.GetBasicType()==typeOfPtrChar){
     867        if( type.GetBasicType() == typeOfPtrChar && calcType.GetIndex() == LITERAL_STRING )
     868        {
    868869            //文字列定数のとき
    869870
     
    10531054    }
    10541055    else if( type.IsDWord() || type.IsLong() || type.IsPointer() ){
    1055         if(type.GetBasicType()==typeOfPtrChar){
     1056        if( type.GetBasicType() == typeOfPtrChar && calcType.GetIndex() == LITERAL_STRING )
     1057        {
    10561058            //文字列定数のとき
    10571059
Note: See TracChangeset for help on using the changeset viewer.