From bcaf7dd39bf426b090c4f530cbf2ebdb7644fb64 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 20 Aug 2008 22:56:46 +0000 Subject: [PATCH] another bug fix --- Robust/src/IR/Flat/BuildCode.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Robust/src/IR/Flat/BuildCode.java b/Robust/src/IR/Flat/BuildCode.java index 52ac05e7..6e1641fd 100644 --- a/Robust/src/IR/Flat/BuildCode.java +++ b/Robust/src/IR/Flat/BuildCode.java @@ -1987,7 +1987,7 @@ public class BuildCode { String dst=generateTemp(fm,fsfn.getDst(),lb); if (srcglobal) { output.println("{"); - output.println("int srcoid=(int)"+src+"->"+oidstr+";"); + output.println("int srcoid="+src+"!=NULL?((int)"+src+"->"+oidstr+"):0);"); } if (statusdst.equals(LocalityAnalysis.GLOBAL)) { String glbdst=dst; @@ -2119,7 +2119,7 @@ public class BuildCode { if (srcglobal) { output.println("{"); String src=generateTemp(fm, fsen.getSrc(), lb); - output.println("int srcoid=(int)"+src+"->"+oidstr+";"); + output.println("int srcoid="+src+"!=NULL?((int)"+src+"->"+oidstr+"):0);"); output.println("((int*)(((char *) &("+ generateTemp(fm,fsen.getDst(),lb)+"->___length___))+sizeof(int)))["+generateTemp(fm, fsen.getIndex(),lb)+"]=srcoid;"); output.println("}"); } else { -- 2.34.1